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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you are developing the script? Using record and play back or manual?

633


What Folder Structure following in Keyword Driven Frame work?

2289


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

1568


What is the significance of “action 0” in qtp?

576


How many types of recording facility are available in quicktest professional (qtp)?

609






Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

1796


How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)

1530


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

579


how can i call function (which has link with excell sheet at a remote location) within another function

1579


How to use setroproperty?

579


How many lines of code in each script of QTP?

4036


How you can decide which type of object repository you have to use?

709


How to write business scripts using object repository with different scenarios

1390


How many types of parameters are available in quicktest professional (qtp)?

587


Explain the concept of object repository and how quicktest professional recognises objects?

563