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 |
What is the concept of firewalls?
What is file database?
How often were they executed?
Recovery Manager means..?
What are metrics and matrix?
Up to how much VB scripting knowledge and what type of VB script knowledge is required for a QTP test engineer for real time to work ?
what is meant by descriptive programming?
how do you configure QTP AND Test director?
If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.
With what extension you can save the list of tests in a file to run in test batch runner?
When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?
How will you handle custom object in QTP?