Pls anyone, tell me the script in QTP to find the number of
links, and images in a webpage. Verry very urgent. I
shall really be very thankful

Answers were Sorted based on User's Feedback



Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / hemakumar.m

'For Links
Dim oLinkDes
Set oLinkDes=Description.Create()
oLinkDes("micclass").value="Link"
a=Browser("title:=.*").Page("title:=.*").Childobjects
(oLinkDes).Count()
Msgbox a

'For Images
Dim oImageDes
Set oImageDes=Description.Create()
oImageDes("micclass").value="Image"
a=Browser("title:=.*").Page("title:=.*").Childobjects
(oImageDes).Count()
Msgbox a

Is This Answer Correct ?    9 Yes 0 No

Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / hemakumar.m

oLinkDes=Description.Create()
oLinkDes("micclass").value="Link"
a=Browser("title:=.*").Page("title:=.*").Childobject
(oLinkDes).Count
Msgbox a

oImageDes=Description.Create()
oImageDes("micclass").value="Image"
a=Browser("title:=.*").Page("title:=.*").Childobject
(oImageDes).Count
Msgbox a

Is This Answer Correct ?    7 Yes 0 No

Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / guru

You use Page checkpoint

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi, I want to retrieve the cell data in the WebTable. For that I have defined a new test object under the browser and have given html tag and text as the test object properties. But while I try to identify it it says 'Object description is not unique'. I tried adding innerhtml, outerhtml, innertext and outertext along with the ordinal identifiers; but no use. What more properties need to be added to identify it? Also I want to enable smart identification for this object but the field is disabled in the object repository for this object alone(In QTP tools->object identification the enable smart identification checkbox is enabled). How do I enable it?

3 Answers  


what is automation(qtp)bug pls giv me one ex?

1 Answers  


What are the 3 main stages involved in testing with qtp?

0 Answers  


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

0 Answers  


What are the Features & Benefits of Quick Test Pro ?

0 Answers   Crea,






hw to create a frame work in qtp..what are the basic steps

2 Answers   Infosys,


Can we use same virtual objects in many number of tests?

1 Answers   TCS,


any body want to learn qtp with real time concept on Banking domain contact ciraaj@gmail.com

1 Answers  


How to Compare two database tables by using QTP?Please give me code details.

1 Answers  


QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue

1 Answers  


How QTP recognizes Objects in AUT?

8 Answers   Blue Star,


What is the main disadvantage of using low level and Analog modes?

2 Answers  


Categories