Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run Error: Cannot find Object's parent
#1
Solved: 11 Years, 3 Months, 1 Week ago
Hi,

I have recorded a simple script in QTP.
It replays for the first time but stops midway the second time I run it with an error. Please refer to the attachment for the error.
I am using IE7 and QTP 11.00 .

Below is the script.


Code:
Browser("Google").Page("Google").WebEdit("q").Set "QTP"
Browser("Google").Page("Google").WebButton("Google Search").Click
Browser("QTP - Google Search").Page("QTP - Google Search").Link("HP QuickTest Professional").Click
Browser("HP QuickTest Professional").Page("HP QuickTest Professional").Sync
Browser("HP QuickTest Professional").Close

Please help.


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 3 Months, 1 Week ago
Hi,

Just make sure u start running ur script every time google.co.in is open not on the page on which u already performed the action or on which script has run.USe systemutil.run "www.google.co.in" at the start of ur script.

Regards,
Sankalp
Reply
#3
Solved: 11 Years, 3 Months, 1 Week ago
Thanks a lot for the quick response. Really appreciate.
I rerecorded the script with changed "Record and Run settings" ("Record and run test on any open browser"). Now I am launching IE for each run as per your suggestion and it is working.
The script is :

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","H:\","open"
Browser("Google").Page("Google").WebEdit("q").Set "QTP"
Browser("Google").Page("Google").WebButton("Google Search").Click
Browser("QTP - Google Search").Page("QTP - Google Search").Link("HP QuickTest Professional").Click
Browser("HP QuickTest Professional").Page("HP QuickTest Professional").Sync
Browser("HP QuickTest Professional").Close

But now whats happening is that the scripts running fine if theres a 15 to 20 secs gap between any two successive runs but it stops if the time gap is small.


NOTE: With systemutil.run "www.google.co.in" its not running.

Is there any workaround for this.
Reply
#4
Solved: 11 Years, 3 Months, 1 Week ago
Time required between execution of two steps can be set under setting.
Go through qtp help file for more info.

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 571 11-05-2023, 03:55 PM
Last Post: lravi4u
  swfwindow object name getting changed after each run saniya 1 1,654 10-10-2018, 09:02 PM
Last Post: TheGlovner
  How to identify an error page occurring in server in between the qtp run. aswini 1 1,776 05-04-2017, 03:52 PM
Last Post: Ankur
  How to get the links which appears on mouse hover of parent link rajendra649 9 35,516 03-10-2017, 06:35 PM
Last Post: satish00k
  verify that parent properties match object currently displayed in your application. sona 0 3,120 02-21-2016, 12:00 PM
Last Post: sona

Forum Jump:


Users browsing this thread: 1 Guest(s)