Write a script in QTP 9.2 using GetROProperty

Previous21 222324252627282930Next

We will write a script using the GetROProperty to fetch the Order Number in the Flight Reservation Application and print it to the user.


Window("Flight Reservation").Activate
Window("Flight Reservation").WinButton("New").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "121212"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "TestUser"
Window("Flight Reservation").WinButton("Insert Order").Click

Wait 8
Ord_Num = Window("Flight Reservation").WinEdit("Order No").GetRoProperty("text")
Msgbox "The Order Number is: " &Ord_Num

Previous21 222324252627282930Next

2 comments:

Unknown said...

Helpful example

kerren said...

thank you for spending some time to prepare this article for us. i'm having a great read.

kerren
www.n8fan.net

Post a Comment

/* Tynt Insight tracker ----------------------------------------------- */