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

what is flag=0 in qtp tool.. i am strugglin to use flag function , exactly when it is used , any real time expert pls explain clearly?

1 Answers  


Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project

0 Answers   T Mobile,


What is the advantage of associating a procedure with a test object?

1 Answers  


How many types of parameters are there?

0 Answers  


Explain the Different types of QTP test assets and their extensions?

0 Answers  






i want to learn testing tools what i have to know before.iam fresher i dnt know any this..which langagues i have to before testing.

2 Answers   Wipro,


Can u Reduce the size of Object repository? What are the problems u have faced in Qtp tool?

2 Answers   IncRev,


How to retrieve data from application objects?

1 Answers  


How to find the length of the string in qtp?

0 Answers  


Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?

0 Answers  


In my application there is a billing thru credit card. how to validate the credit card details(min balance,credit card no,card holder name).if these details are valid then only that booking will be done.how to validate these details thru automation or manual?

1 Answers  


What is output value in QTP? Why do we use the output value in QTP?How many types of output values are there in QTP? what are their respective usage in QTP?

14 Answers   IBM,


Categories