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 |
in QTP,how to write a descriptive program for "yahoo" or "gmail" Login page
Hi, I want to write the script for a webpage. But i didn't added the properties of the objects to the object repository. Without adding the object properties to the object repository, how to write the script. When i am writing the script, Let us say i typed as Browser (""). after selecting ".", if the object is added to the object repository it will display atomatically. But in my case it is not as i didn't added the object properties. How to proceed further in the above mentioned case to write the script manually. Pls let me know if you didn't understand the question.
How can i use Ordinal identifiers and Smart identification methods suppose i want to know the index no of check box
WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,
What is an optional step in qtp ?
what ar the challenges do we face while testing webbased applications using the automation tool qtp or any?
Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder
Write a Script With descriptive programming(Without Repository) to update an Update an order in Flight App and verify whether it is done successfully.(Use ChildObjects method)
Synchronization methods?
in how many ways we can write the user defined functions one way i know that i.e storing it in .vbs another way i does not know my friend said that .qtf or something but start with q letter can any buddy knows about this
Can anybody send me the code to get the RO property of the active screen in QTP while running?
how many test scripts we will write in qtp? very urgent. please??? Thanks in advance..