Micro Focus QTP (UFT) Forums
error on web - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: error on web (/Thread-error-on-web)



error on web - newqtp - 05-14-2008

Hi all,

Here is my code:

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Documents and Settings\Sysadmin","open"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "http://www.timesofindia.com/"
wait(18)
Browser("Browser").Page("The Times of India: No").Link("IPL: Mumbai thrash Chennai").Click
Browser("Mumbai Indians thrash").Page("Mumbai Indians thrash").Sync
Browser("Mumbai Indians thrash").Close

In my code i've put wait statement cuz when you type url and when page open there is one popup window or advertisement comes and it stays there for sometime and when that goes or close by itself qtp should be able to click the link but somehow qtp doesn't when i recorded i did the same.

I've also tried to use recovery scenario.And added to the test but still i'm getting error.Can anyone help how to use recovery scenario or is there any other solution for this problem.

I've attached the screen shot.
Thanks,
Learner


RE: error on web - somisays - 05-15-2008

Dear newqtp,

I want to clarify few things in your code.
1)You used in fewlines Browser("Browser")...That means do you have Browser object in the object repository.
2)line 9 of your code you used "Mumbai Indians thrash" for both browser object and page object so that means you have browser name as "Mumbai Indians thrash" and also page name "Mumbai Indians thrash" in object repository.

Just give me answer for the above things then i can help you in that.

Regards
Sridhar


RE: error on web - newqtp - 05-15-2008

wait(18) here i've given the wait statement to wait for that advertisment to go away.after it has to click a link below one .But here i'm getting problem.
Code:
Browser("Browser").Page("The Times of India: No").Link("IPL: Mumbai thrash Chennai").Click
after clicking this link it will open new browser with that name Mumbai Indians thrash. that's why here Browser is different and all the object is in OR.
Code:
Browser("Mumbai Indians thrash").Page("Mumbai Indians thrash").Sync

hope you get the point.


RE: error on web - somisays - 05-16-2008

Dear Newqtp,
Do you have "Mumbai Inidans Thrash" browser object in the Object Repository ? ......Please check it.

Regards
Sridhar


RE: error on web - newqtp - 05-16-2008

yeah i have it in OR


RE: error on web - Guest - 05-16-2008

hi
Just record your script once more