I got an error "The"flightres" Dialog was not found in the
Object Repository. Check the OR to confirm that the object
exists or to find the correct name for the object." while
running the following script

Set flightres=description.Create()
flightres("text").value="Login"
flightres("Class Name").value="Dialog"

Set agent = description.Create()
agent("nativeclass").value="WinEdit"
agent("attachedtext").value="Agent Name:"

Set pwd = description.Create()
pwd("nativeclass").value="WinEdit"
pwd("attachedtext").value="Password"

Set button = description.Create()
button("nativeclass").value="WinButton"
button("Text").value="OK"

Dialog("flightres").WinEdit("agent").Set "test"
Dialog("flightres").WinEdit("pwd").Set "mercury"
Dialog("flightres").WinButton("button").Click

Please let me know if i made any mistake in the above script...?

Answer Posted / raj

Don't put object name in qoutes.

write like
Dialog(flightres).WinEdit(agent).Set "test"
Dialog(flightres).WinEdit(pwd).Set "mercury"
Dialog(flightres).WinButton("button").Click

If you put object name in qoute then qtp try to find that
object in OR.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use reporter.report event in qtp ?

650


How can I check if a environment variable exist or not?

635


In qtp, how you can use xpath to identify objects?

704


How to use the object spy in quicktest professional 8.0 version?

628


How do Parameterization and Data-Driving relate to each other in QTP?

666






What are the methods of the TextStream object that are used for reading from a text file?

1767


Explain how Does Run time data (Parameterization) is handled in QTP?

637


Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?

1613


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1524


Have you used xml check point in your project? How?

629


How to carry out bit map check points in QTP

1843


Can we create a qtp test from qc?

683


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

1714


What is the difference between run time object and test object?

663


How to test the login page in different ways in automation testing and i need code?

1439