Saturday, June 21, 2008

Script for Data Driven test with Rational Robot's Datapool.

'The script can be used or modified as needed after creating appropriate Datapool in Rational Robot.

'$include "sqautil.sbh"

Sub Main

Dim Result As Integer
DIM dp_result as long
'DIM dp_result as long
Dim dp_agentName as string
Dim dp_password as string
Dim dp_fetchResult as long
Dim dp_result1 as long
Dim dp_flight as long

'Script Name: dataPoolLogin


FOR I=1 TO 2
dp_Fetchresult = SQADatapoolFetch(dp_flight)
Window SetContext, "Class=Shell_TrayWnd", ""
Toolbar Click, "Text=Quick Launch;\;ItemText=Flight", "Coords=16,8"

Window SetContext, "Caption=Login", ""
EditBox Click, "ObjectIndex=1", "Coords=7,8"
dp_result = SQADatapoolValue(dp_flight,1,dp_agentName)
' InputKeys "mercury"
InputKeys dp_agentName

EditBox Click, "ObjectIndex=2", "Coords=10,2"
dp_result1 = SQADatapoolValue(dp_flight,2,dp_password)
'InputEncKeys "CAAAAM4AAAAICaEYwet4JA=="
InputKeys dp_password
PushButton Click, "Text=OK"

' closing flight reservation
Window SetContext, "Caption=Flight Reservation", ""
Window Click, "", "Coords=39,-34"
MenuSelect "File->Exit"


End Sub

Wednesday, June 18, 2008

Bugs with new Yahoo! Mail version? or Bugs with Mozilla Firefox browser?

It was nice to find some bugs, but not sure whether those are from Mozilla Firefox browser or of new Yahoo! Mail version.
With the Firefox browser installed of version, logging into Yahoo! Mail Classic, upgraded it to the new Yahoo! Mail (beta version).
Clicked on drop down arrow button, near the city name for which the temperature was being displayed. An edit box for entering the city name or postal zip code was displayed along with the ‘Go’ button.
with no edit box
Upon, entering a valid zip code of a city, few city names were displayed for which the zip code tallied. Selected Bangalore. The check box was checked which had a caption “Make this the default location for Yahoo!”
Again repeated the same process i.e., from clicking on drop down arrow, till entering the zip code of a city. This time entered the name of the city. Again repeated the process and entered a zip code of a city. The locations that were browsed recently were displayed under the Recent Locations frame, where “Delete All” was also displayed.

Clicked on the “Delete All” phrase. Noticed the strange thing. The frame was retained as it is, but it was transparent after clicking on “Delete All”. Scrolling the vertical scroll bar of the Mozilla Firefox browser, took off the displayed transparent layout. This is reproducible very easily on Mozilla Firefox with new Yahoo! Mail version.

With Mozilla Firefox and new Yahoo! Mail version (after login).
Clicked on drop down arrow button, near the city name for which the temperature was being displayed. An edit box for entering the city name or postal zip code was displayed along with the ‘Go’ button.
with cursor

with cursor
Clicking in the mouse at the edit box, the cursor was displayed. Selected the displayed city name in the edit box and deleted it. Still the cursor was displayed.

Repeated the process again i.e., from clicking on drop down arrow button till the display of the edit box with the city name shown. Clicked in the mouse at the edit box; this time the cursor was not displayed. Deleted the text displayed inside the edit box. The cursor was not displayed. Entering a text through keyboard, entered character would appear in the edit box. Entering only white spaces in the edit box, the white spaces can be seen by selecting all the contents of the edit box, with no cursor displayed even after not selecting the contents of the edit box (which had only white spaces or combination of characters and white spaces). with no cursor

with no cursor

Any opened window gets minimized after few seconds, upon dragging down a text displayed in the dialog.
Trying to switch back for Classic Yahoo! Mail version, clicked on the “Mail Classic” text. A dialog of title “Switch to Yahoo! Mail Classic?” was displayed which had a message:
“Udating your account….
Before you do, we’d love your feedback”.
This dialog had two buttons namely “Switch to Yahoo! Mail Classic” and “Cancel”. Clicked on the “Switch to Yahoo! Mail Classic”. Later for few seconds (around 3 to 4), the dialog remained as it is with no buttons. Clicked on the hyperlinked word ‘feedback’ and dragged it down to the taskbar, keeping the left mouse button without released. The new Yahoo! Mail version displayed changed to the Classic Yahoo! Mail version without any issue.
As expected, the Yahoo! Mail was changed Classic Yahoo! Mail version.
Now, started the hide and seek play. Opening any window that was opened or any new window would get minimized after 5 to 6 seconds upon opening it. This happened to all the window/GUI that remained maximized on the desktop. Using ALT+Tab, to get the minimized window to desktop, it did not work i.e., no window got restored back.
Later clicking on the Classic Yahoo! Mail tab on the taskbar, an error dialog with message:
“You cannot drag an item onto a button on the taskbar.
However, if you do this without releasing the mouse button, the window will open and you can then drag the item into the window”, was displayed.
If you notice the same, please write. Also, if you did not notice the above said, please write the steps you followed to reproduce. Waiting for the comments.....

Have a happy memorable Testing !

All were noticed only on Mozilla Firefox browser of version as well as only.All the above said were not noticed with Internet Explorer browser of version 6 as well as 7.

Friday, June 13, 2008

VBScript to close the opened Command prompt (can be used with testing tool QTP).

' Little modification has to be made to close any unwanted opened windows. By identifying the Process/Task name through the Task Manager, the process name can be obtained.

' The below written VBScript closes the all opened Command prompt(s).

Set oShell = CreateObject("WScript.Shell")
Set oWmg = GetObject("winmgmts:")
strWndprs = "select * from Win32_Process where name='cmd.exe'"
Set objQResult = oWmg.Execquery(strWndprs)
For Each objProcess In objQResult
intReturn = objProcess.Terminate(1)