in qtp how i can retrive from a browser how many links are
there.means total no of links used in a browser

Answers were Sorted based on User's Feedback



in qtp how i can retrive from a browser how many links are there.means total no of links used in a ..

Answer / sandeepguttikonda

To get the count of total number of links in a browser we
need to use "Childobjects".

And we can perform this by using the below code:

/* Creating the description object*/
Set oDescFrame = Description.Create
oDescFrame("micclass").Value = "links"

Set Links_Count = Browser("name:="&Browsername).page
("title:="&Pagetitle).ChildObjects(oDescFrame)

Msgbox &Links_count.count

This will display the total number of links in a page.

Please let me know if you need any further info.

Thanks.

Regards,
Sandeep Guttikonda

Is This Answer Correct ?    15 Yes 0 No

in qtp how i can retrive from a browser how many links are there.means total no of links used in a ..

Answer / santhosh

Set a = Description.Create
a("micclass").Value = "Link"

Set b = Browser("name:=Yahoo! India").page("title:=Yahoo!
India").ChildObjects(a)

msgbox b.count

Is This Answer Correct ?    4 Yes 0 No

in qtp how i can retrive from a browser how many links are there.means total no of links used in a ..

Answer / rajanikanthreddy

set desc=description.create()
desc("html tag").value="A"
set a=browser("name:=Book Store").page("title:=Book
Store").ChildObjects(desc)
print a.count
For i=o to a.count-1
b=a(i).getroproperty("text")
print b
next

Is This Answer Correct ?    4 Yes 0 No

in qtp how i can retrive from a browser how many links are there.means total no of links used in a ..

Answer / venkatesh

links=Browser().page().getroproperty("number of links")

msgbox links

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More QTP Interview Questions

how qtp handles customised object

1 Answers  


How to write script to display a message box having the "Date" value of the fourth mail(yahoo account). I've tried it with the web table concept but the content doesn't get displayed? Please help me out to resolve this :-)

2 Answers  


Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a web application, i want to click some 5,13 & 17th links. So please....can anybody give the answer....??? -->Hani<--

4 Answers  


what is output parameters in qtp?explain? 2)

2 Answers   Span Infotech, TCS,


Can any body explain me how to prepare QTP frame work with an example?? alexander.gdk@gmail.com

1 Answers  






i've installed qtp9.2 on Windows 7. Recording and everything no problem. But when i am saving the test, it is not happening. it says 'general error while saving'. But teh test is getting saved but as a folder with lock icon. When i wanted to open it, it is jst showing as a locked folder but not as a test. Somebody help me out plz

1 Answers  


Can any one send me the QTP Basic Coding Samples?

0 Answers  


suppose i give valid user id and password to open an web base application on qtp.how qtp will know itis a valid user id and password

3 Answers  


how we will use output values in qtp? is there any possibulity by descriptive programming?

2 Answers  


Write a code check the checkbox in the web table which is in the 4th row and fifth column (Use child item concept)

2 Answers   FIS, Wipro,


what is the difference between Automation object model(AOM) and test object model(TOM)

2 Answers   UHG,


Q) Please any body can help me how we can create descriptive programming if the application is not ready i.e we don't have unique property of object ? note:build not ready means we can't use object spy in build to get unique property .

2 Answers  


Categories