how do find current links in webpage for ex: in
yahoowebsite today mainpage is having 50 links and next day
same page is having 60 links. if i run same programe it
should display total links in webpage ?
Answers were Sorted based on User's Feedback
Answer / badri
Above script for weblists
To count No of Links in webpage:
Set chobj=description.Create
chobj("micclass").value="Link"
Set obj=Browser(" ").Page(" ").ChildObjects(chobj)
'Count the no of objects
n=obj.count
msgbox "No of Links: "&n
| Is This Answer Correct ? | 11 Yes | 0 No |
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebList"
Set Lists = Browser("Mercury Interactive").Page("Mercury
Interactive").ChildObjects(oDesc)
NumberOfLists = Lists.Count()
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / u v r murthy
By using Page Check point also we could find out the total
link which are available in that particualr page.
Procedure: insert Standard check point then select any
object in the page, you will get Object selections popup,
there u can select page object, again you will get one more
popup called "Page Check point properties" in this popup
make sure that u have selected Links check box under ALl
OBJECTS IN PAGE then click ok.
Finally run the script. you will get the no of links
available in current used page in result window
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sudheerreddym
Set link obj=description.Create
linkobj("micclass").value="link"
Set link childobjs=browser("Yahoo").Page("Yahoo").chldobjects(linkobj)childcount=link childobjs.Count
for i=0 to child Count-1
msgbox link childobjs(i).getRoproperty("innertext")
next
if u want to click on the last link on that page:
browser("Yahoo").page("Yahoo").link(index:="&childCount-1).cclick
set linkobj=nothing
| Is This Answer Correct ? | 0 Yes | 0 No |
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
There is a table with 4 columns and 10 rows, how to write the script to display the first column records using qtp? can anybody help me with script?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.
Use of environment variables?
How to differentiate the webedit field like user name and password? Please tell any other best answer is ther
hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful?
What are the file extensions for per-action, shared object repository files and what is the extension for library files?
Hi, I Would Like to Know which is the Best QTP Certification Training Institute in Hyd? Thanks in Advance kishan
what is the use of descripting programming?
what is object and child object.. explain ..if possible give some example for better understanding ..
What is difference between function and procedure?
41 Answers HCL, IBM, iGate, Infosys, TCS, Veritas, Wipro,