Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webpage....Link test
#1
Not Solved
Hi,

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
Reply
#2
Not Solved
Hi Shrini,
Try this:
Code:
Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"

Set Links = Browser( "micclass:= Browser").Page("micclass:= Page").ChildObjects(oDesc )

For i = 0 to Links.Count -1
  oDest("index").Value = i
  Browser( "micclass:= Browser").Page("micclass:= Page").Link(oDesc).Click
Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Capture All text from webpage and copy it... mpatra 3 5,261 07-25-2018, 05:33 PM
Last Post: vimlesh
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,210 09-28-2016, 09:16 PM
Last Post: supputuri
  Using static descriptive programming how to count no. of objects on any webpage alpha1 4 6,989 08-11-2015, 08:48 PM
Last Post: kotaramamohana
  Embedded Text on webpage srach84 1 2,739 07-28-2014, 07:35 AM
Last Post: Ankur
  VB SCRIPT to click on specific links on webpage and store related data ACCBAJPA 1 10,011 04-02-2013, 01:33 PM
Last Post: ACCBAJPA

Forum Jump:


Users browsing this thread: 1 Guest(s)