Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error on web
#1
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
Reply
#2
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
Reply
#3
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.
Reply
#4
Dear Newqtp,
Do you have "Mumbai Inidans Thrash" browser object in the Object Repository ? ......Please check it.

Regards
Sridhar
Reply
#5
yeah i have it in OR
Reply
#6
Smile 
hi
Just record your script once more


Attached Files
.doc   New Microsoft Word Document.doc (Size: 356.5 KB / Downloads: 156)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web service automation:Error "could not create SSL/TLS secure channel" pranjalipalkar 0 2,964 01-16-2013, 11:40 AM
Last Post: pranjalipalkar
  XPath for web link throws error srselva 1 2,171 12-11-2012, 12:10 AM
Last Post: supputuri
  Web Page expired error smita godbole 2 3,554 04-25-2012, 08:36 PM
Last Post: smita godbole
  I want to not fail on handeled run error in web service test sanavab 4 5,271 05-21-2011, 12:10 PM
Last Post: sanavab
  Web Service Automation error Ajay Hoskote Somashekar 1 3,468 01-04-2011, 07:22 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)