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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is error and fault in terms of software quality?

1507


Will down time for server and content maintenance/upgrades be allowed? how much?

617


Is it possible to call win runner script in qtp?

626


what is the diffrence bw qtp architectute and qtp framework?

1541


What are the types of data tables in qtp?

583






how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up

3773


iam have done mba(finance)in 2008. in 2008 one reputed consultancy came off campus interview our institution. i got job as "manual test engineer". now iam working as "manual testing engineer". now my problem is when iam going interview the interviewer asking like " ur mba gradute how can u get job in test engineer." this question i have faced every interview. iam explaining how iam getting job. but they are not trust me". pls tell me answer how i am giving relavent ans.. this is my mail id y.ramana84@gmail.com

1401


How to carry out bit map check points in QTP

1768


I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)

1414


Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly

1253


How to get popup error message.

1030


Can we record using all the modes in a single script? Explanation with example is appreciated

1390


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

638


What is the default add-ins in qtp?

556


What is the pros and cons between QTP and Rational Robot

3284