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 ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

3002


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

7210


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1494


How do know the number of browsers opened?

620


Explain different types of action in qtp?

568






Diff b/w test scenario's and test Procedures?

1624


Which environments does qtp support?

668


If object is not recognized by qtp but the object is standard object what is your approach?

586


Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan

2054


What is the limitation to XML Checkpoints?

1597


What are some test assets and related extensions of qtp?

544


How to find the length of the string in qtp?

576


Hi All, How to Compare two strings character by character in QTP

951


what is Property......End Property loop? how to write sript for it in QTP

1883


Explain the terms test and business component?

542