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 do call a output parameter from one action to another action??/

1872


What VBScript operators, functions, and statements do you use in QuickTest Professional?

2170


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

1567


What are metrics and matrix?

1365


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

576






Can U Explain about QTP tool from older version to latest version also its differences?

1516


Which features or drawbacks of QTP lead to the upgrade for a newer version?

572


Why qtp always start action1 and does not start action?

602


How to use output values in qtp ?

554


how to find that tools work well with ur existing system?

1354


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

1836


How to find the length of the string in qtp?

576


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2060


HOw to add the recovery file at runtime to the test file .

1536


What is the parameterization? Give one example?

592