Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get total links visible on a webpage
#5
Not Solved
Code:
Set oBrowserDescriptions = Description.Create ()
oBrowserDescriptions("micClass").Value = "Browser"
oBrowserDescriptions("openedbytestingtool").Value = "True"
Set oPageDescriptions = Description.Create ()
oPageDescriptions("micClass").Value = "Page"
Set oBrowserObj = Browser(oBrowserDescriptions).Page(oPageDescriptions)
Systemutil.Run "iexplore"
Browser(oBrowserDescriptions).Navigate "www.google.com"
oBrowserObj.Sync
Set oBowserChObj = oBrowserObj.ChildObjects(oLinkDescriptions)
Set oBowserChObj = oBrowserObj.ChildObjects()
iChObjCnt = oBowserChObj.Count -1
msgbox iChObjCnt
For iCount = 0 to iChObjCnt
    If  oBowserChObj(iCount).GetROProperty("micclass") = "Link" Then
        If  oBowserChObj(iCount).GetROProperty("visible") = true Then
    msgbox oBowserChObj(iCount).GetROProperty("name")
    End if
    End If
Next
Reply


Messages In This Thread
RE: Get total links visible on a webpage - by DinakarVadapalli - 02-11-2011, 03:35 PM

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
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,650 02-07-2017, 12:28 AM
Last Post: sparkwanted
  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
  I want to click on all the links in the webtable. These links are nothing but some co abhideshpande001 0 2,658 07-22-2015, 09:36 AM
Last Post: abhideshpande001

Forum Jump:


Users browsing this thread: 1 Guest(s)