Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How will you handle java tree in qtp?

1069


What are the technics follow in writing VB script?

1932


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

1516


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?

1987


How you can find the absolute value of the number in qtp?

970


Is it possible to switch between recording modes during a test creation?

1020


what is the difference between built-i function and In-built function?

2131


Where to use function or action?

1132


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

1932


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)

2090


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

1295


How many scripts did you have?

2151


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1938


How to execute a winrunner script in quicktest professional (qtp)?

920


What is the virtual object?

1100