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

Wher to use DATA TABLE METHODS in Qtp?What is the use of it?

8 Answers   Wipro,


Can any give an example(if possible templates) how to test web application using QTP. thanks in advance

0 Answers  


What is the difference between Call to Action and Copy Action?

2 Answers   Satyam,


I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so

0 Answers  


want to learn real time automation project(QTP)?

1 Answers  


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,


how can I read text in browser and export the same into text file?

5 Answers   HP,


How does QTP identifies the object in the application?

1 Answers   Crea,


How you know that a test case is a regression test case

1 Answers  


Hi guys, can anyone explain me whats the method for reporting the QTP test results to teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!

2 Answers  


How to interact tool & application build in QTP?

0 Answers  


How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.

5 Answers  


Categories