Count, how many Buttons and Edit boxes available in Flight Reservationmain window.

If Not window("Flight Reservation").Exist (2) Then
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "bcroy"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
End If
Set oDesc = Description.Create()
oDesc("micclass").Value = "WinButton"
Set Buttons = Window("text:=Flight Reservation").ChildObjects (oDesc)
Num_Buttons = Buttons.Count()
Set oDesc1=Description.Create()
oDesc1("micclass").Value="WinEdit"
Set Editboxes=Window("text:=Flight Reservation").ChildObjects (oDesc1)
Num_Editboxes= editboxes.count ()
sum= Num_Buttons+Num_Editboxes
Reporter.ReportEvent 2, "Res","Total Buttons: "& Num_Buttons &"Total Edit boxes: "& Num_Editboxes

Count, how many Buttons and Edit boxes available in Flight Reservationmain window. Count, how many Buttons and Edit boxes available in Flight Reservationmain window. Reviewed by Animesh Chatterjee on January 24, 2010 Rating: 5

1 comment:

  1. Thank You for the prompt response to my request Mr. Animesh. Your Template is very helpful. If i have some more questions in my mind, i will bug you again.

    ReplyDelete

Powered by Blogger.