Hi..
there is one problem in my script.. I am getting one runtime error While i am trying to use the copy of action function . take a example of flight Reservation . I have created seprated action name as" Login" This action is not a reusable . While i used this action using Insert--> call to copy action
and run the script .. Error message is displaying .
I am enclosing the snaps . Kindly find the attached snaps . and help me out.
Why this problem is appearing ?
1. Repository association to the action ?
2. From the OR select the object "Agent" and highlight it in the application.
3. Place a breakpoint and debug to see where exactly and why it causes the error.
Let me know the outcome.
Warm Regards,
basanth
Basanth Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
08-12-2009, 01:18 PM (This post was last modified: 08-12-2009, 01:21 PM by Saket.)
Also Check if your application is running and should be at Login before run.
Or you can insert a statement to launch the application in the login action reusable.
i beleive you have not started the application before execution of your test, thats why the error is there
the first thing can you tell us - have you started the application before runing your script?
In your script, you see the error occurs at very step where you are setting agent name.
Error occurs as object's parent is missing i.e Login dialog. that means QTP is not able to find the application under test.
So you will have to launch the application first and then start execution.
@Saket - please dont mind, i am going to merge your answers with mine because they seem very much basic verification which definitely needs to be done before we begin.
Check the below before you begin the execution,
1. Have you opened the application ??
2. Was the application opened before QTP or after QTP ? If you are confused and not sure then, Close QTP and the application, Open QTP first and then the Application.
3. Where have you added the objects to the repository ? Is it local or Shared ? If local dont bother at all. if shared, Right click on the action, navigate to Action->Action Properties and then Associate repositories. Verify if the Shared Repository is associated to the action your code is in.
Execution :
1. Start the execution.
2. If you get the same error, Stop the execution. Go to the Object Repository Manager, open your repository, Select the Object and then click on the option Highlight in the application. Does it highlight ?
If yes, Then come back to your script place a breakpoint before the line it errors out.
Start the execution again, and at the breakpoint begin debugging.Check how the application behaviour is at the moment of error.
Let us know if this helped you.
Basanth Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.