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 to generate numbers in between to numbers suppose numbers in between 500 to 1000 in sequencies using vbscript

1 Answers  


What scripting language QTP of?

4 Answers  


What is the difference between action & script?

3 Answers  


How can i Save the snapshots in a specified folders using Scripting in QTP?

1 Answers  


Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you

0 Answers  






how to upload an excel sheet to quality center?

1 Answers  


str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer

3 Answers   Ziynx,


1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?

0 Answers  


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

0 Answers   Mphasis,


what is the difference between invoke application and system.util.run

24 Answers   HP, Syntel,


What is diff between SDLC AND STLC?

1 Answers   Nokia,


WHICH PROCESS U FOLLOW IN COMPANY

1 Answers   IGT,


Categories