Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get total links visible on a webpage
#6
Not Solved
visible is boolean so use = True with no quotes

Code:
Set oDesc = Description.Create()
oDesc("micclass").value = "Link"
'oDesc("visible").Value = True
Set childCollection = Browser("Google").Page("Google").ChildObjects(oDesc)
num = childCollection.count

msgbox "number of links = " & num

s = ""
For i = 0 to num - 1
    var = childCollection.item(i).GetROProperty("innertext")
    var_2 = childCollection.item(i).GetROProperty("visible")
    var_all = var & ": " & var_2
    s = s & vbcrlf & var_all
Next

msgbox s

on 2012-02-16. there are 40 links. 21 links have visible = True
Run the code with visible active and not active.

hth,


Parke
Reply


Messages In This Thread
RE: Get total links visible on a webpage - by Parke - 02-16-2012, 10:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Capture All text from webpage and copy it... mpatra 3 4,917 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,454 02-07-2017, 12:28 AM
Last Post: sparkwanted
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,045 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,732 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,576 07-22-2015, 09:36 AM
Last Post: abhideshpande001

Forum Jump:


Users browsing this thread: 1 Guest(s)