Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB Script to count number of links in a web page.
#1
Solved: 8 Years, 4 Months, 2 Weeks ago
How to count number of links in a web page using VB Script in QTP/UFT? Please let me know the logic.
Reply
#2
Solved: 8 Years, 4 Months, 2 Weeks ago
Code:
Set Des_Obj = Description.Create
Des_Obj("micclass").Value = "Link"
Set link_col = Browser("name:=Google").Page("title:=Google").ChildObjects(Des_Obj)
msgbox link_col.count
Reply
#3
Solved: 8 Years, 4 Months, 2 Weeks ago
Thank you Vinod,

Just wanted to know can we use the same logic to count the number of objects in a page? Is it possible to count the number of objects?
Reply
#4
Solved: 8 Years, 4 Months, 2 Weeks ago
Yes you can use same logic to count the number of objects in a page?
Reply
#5
Solved: 8 Years, 4 Months, 2 Weeks ago
Code:
systemutil.Run"iexplore.exe","http://www.google.com"
set aa=description.create
aa(html tag).value="A"
set bb=Browser("title:=google.*").page("title:=google.*").childobjects(aa)
cc=bb.count
msgbox cc
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Object Unique ID Number zunebuggy 0 1,579 07-10-2017, 05:37 PM
Last Post: zunebuggy
  click each web link in a page using Index or other method in QTP smeijer 13 24,818 04-29-2017, 04:53 PM
Last Post: kowshik
  This code does not give total no of links present on page plz help it returns 0 excellentpawan 8 5,719 01-17-2015, 07:49 PM
Last Post: yogi4tech
  I want to count total no of links in a page and click one by one excellentpawan 9 7,335 07-23-2013, 11:51 AM
Last Post: Ankur
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,173 05-03-2013, 11:53 PM
Last Post: agarwl.anurag

Forum Jump:


Users browsing this thread: 1 Guest(s)