Write a QTP script to print all the link names displayed in
a web page

Answer Posted / xyz

set linkObj=description.create
linkObj("micclass")="link"

set linkChildObj=B().p().childobjects(linkObj)
childCount=linkChildObj.count

for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
msgbox linkName
next

Is This Answer Correct ?    52 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is qtp window?

566


how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps

1675


I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing

1485


Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?

1486


Is the qtp course will help to create a virtual object?

1516






What is a reusable action?

576


What are parameterizing tests?

551


Can any suggest me what is exposure testing?

1380


how u will evaluate the tool for test automation?

1370


What is contained in the object repository?

619


Do you know how to connect database? Can you tell me the procedures?

551


How to release all resources file from the QTP?

1055


Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.

1712


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

637


Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.

2103