how can i count the number of links???
Answers were Sorted based on User's Feedback
Answer / nalini
There are two ways to get the count of links on a page.
1) g=Browser("Google").Page("Google").GetROProperty("number
of links")
print g
2) set ld=description.Create()
ld("micclass").value="Link"
set lobj=Browser("Google").Page("Google").ChildObjects(ld)
c=lobj.count
print c
| Is This Answer Correct ? | 1 Yes | 0 No |
Using child objects we can count the links. script is as
given below
SystemUtil.Run "www.hdfcbank.com"
Set aa=description.Create
aa("html tag").value="TD"
set bb=Browser("name:=HDFC Bank.*").Page("title:=HDFC
Bank.*").childobjects(aa)
cc=bb.count
msgbox cc
For i=0 to cc-1
bb(i).highlight
Next
| Is This Answer Correct ? | 1 Yes | 1 No |
how to find that tools work well with your existing system?
how can we handle exceptional handling in qtp
how will check the links in multiple pages at a time
how to invoke the web application through script in qtp
Can we run test with out adding object in object repository? How it is possible?
How to Start recording using QTP?
How to capture all the data of a webtable, weblist and combolist using QTP?
Explain in brief about the qtp automation object model (aom).
What's QuickTest Window?
what is the purpose of QTP?
WHAT IS THE DESCRIPTIVE programming when it is useful? & when to use this ?
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly