03-18-2010, 05:07 PM
Hi,
Stuck in web page link testing....
To test all the links in Webpage i am using following code:
Issues:
(1) The abve code works ok for First link in web page but not working for next 9 links. i.e it click 1st link successfully but when going for next link click it fails......
--> can anybody suggest why? and how to resolve it?
(2) The browser & page properties always changes during runtime (dynamic) as:
Browser("AAA").Page("AAA").Link("AAA").Click (for the first link)
Browser("BBB").Page("BBB").Link("BBB").Click (for the Second link)
Browser("CCC").Page("CCC").Link("CCC").Click (for the third link)
--> can anybody suggest how to write code (DP) when brower/page title's/properties are changing with each link AND still we have to test all the links in webpage.
Please help...
Thanks
Shrini
Stuck in web page link testing....
To test all the links in Webpage i am using following code:
Code:
Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
oDesc("micclass").RegularExpression = True
Set Links = Browser( "title:= AAA.*").Page("title:= AAA.*").ChildObjects(oDesc )
msgbox Links.count 'ex we found 10 links
For i = 0 to Links.Count -1
v_link = Links(i).GetRoProperty("text")
Links(i).Click ' successfully clicks first link
Next
Issues:
(1) The abve code works ok for First link in web page but not working for next 9 links. i.e it click 1st link successfully but when going for next link click it fails......
--> can anybody suggest why? and how to resolve it?
(2) The browser & page properties always changes during runtime (dynamic) as:
Browser("AAA").Page("AAA").Link("AAA").Click (for the first link)
Browser("BBB").Page("BBB").Link("BBB").Click (for the Second link)
Browser("CCC").Page("CCC").Link("CCC").Click (for the third link)
--> can anybody suggest how to write code (DP) when brower/page title's/properties are changing with each link AND still we have to test all the links in webpage.
Please help...
Thanks
Shrini