Micro Focus QTP (UFT) Forums
Pb with script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Pb with script (/Thread-Pb-with-script)



Pb with script - mouss4rs - 02-11-2014

Hi everybody,

I have a problem with my script for Flight Reservation System.

Code:
Window("Flight Reservation").WinButton("New Order").Click @@ hightlight id_;_853078_;_script infofile_;_ZIP::ssf1.xml_;_
Window("Flight Reservation").ActiveX("MaskEdBox").Type "021314" @@ hightlight id_;_787902_;_script infofile_;_ZIP::ssf2.xml_;_
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt" @@ hightlight id_;_2164062_;_script infofile_;_ZIP::ssf3.xml_;_
Window("Flight Reservation").WinComboBox("Fly To:").Select "London" @@ hightlight id_;_2753816_;_script infofile_;_ZIP::ssf4.xml_;_
Window("Flight Reservation").WinButton("FLIGHT").Click @@ hightlight id_;_2229578_;_script infofile_;_ZIP::ssf5.xml_;_
Window("Flight Reservation").Dialog("Flights Table").WinButton("Cancel").Click @@ hightlight id_;_1705312_;_script infofile_;_ZIP::ssf6.xml_;_
@@ hightlight id_;_3408976_;_script infofile_;_ZIP::ssf10.xml_;_
Window("Flight Reservation").WinButton("Insert Order").Click @@ hightlight id_;_1049940_;_script infofile_;_ZIP::ssf11.xml_;_
Window("Flight Reservation").WinButton("New Order").Click


Run error windows appears:
Code:
The "Cancel" WinButton object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.

Line (6): "Window("Flight Reservation").Dialog("Flights Table").WinButton("Cancel").Click".

Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository.

Why the script modification wasn't considered ??

i need help Sad


RE: Pb with script - guin.anirban - 02-24-2014

Boss,

Plz check whether you are able to highlight your "Cancel" object from OR. If not update the object properties.
It should be a problem with object properties.