Write a QTP script to print all the link names displayed in
a web page
Answer Posted / siba
set linkObj=description.create()
linkObj("micclass").value="link"
set linkChildObj=Browser("Google Accounts").page("Google
Accounts").childobjects(linkObj)
childCount=linkChildObj.count
msgbox(childCount)
for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
print( linkName)
next
| Is This Answer Correct ? | 16 Yes | 2 No |
Post New Answer View All Answers
How will you handle java tree in qtp?
What are the technics follow in writing VB script?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
How you can find the absolute value of the number in qtp?
Is it possible to switch between recording modes during a test creation?
what is the difference between built-i function and In-built function?
Where to use function or action?
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
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
How many scripts did you have?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
How to execute a winrunner script in quicktest professional (qtp)?
What is the virtual object?