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



how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and..

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

how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and..

Answer / bkiranratna

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

how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and..

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

how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and..

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

Post New Answer

More QTP Interview Questions

how to write the descriptive programming in QTP for loginwindow.without using Step generator,object repository for referecnes

4 Answers   STC,


I am using environment variable xml to give credenatials for login into unix. Is there any way we cam mask the password in the xml?

1 Answers  


what function you write to do database testing with the help of qtp?

1 Answers  


Get the count of files of similar types from a folder.

1 Answers   Deloitte,


How Can I automate PDF forms using QTP9.2 ?

0 Answers  


Why qtp the best testing tool?

1 Answers  


What are the types of properties that quick test learns while recording?

1 Answers  


What are private functions in QTP? How they can be called from the function library?

1 Answers   HCL,


What are the types of Object Repositories in QTP?

1 Answers   Ordain Solutions,


Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........

1 Answers  


What is the difference between Normal mode and Fast mode ?

1 Answers   AZTEC,


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

1 Answers  


Categories