in one page we have 100 links i have to click the 99th link
how can i click the 99th link.
Answers were Sorted based on User's Feedback
Answer / anish wilson
Using descriptive programming.
set objLink= Description.Create()
objLink("micclass").value="WebLink"
set intObjLink= .childObjects(objLink)
Count= intObjLink.Count
intObjLink(Count-1).Click()
| Is This Answer Correct ? | 28 Yes | 4 No |
Answer / uday
set lnkObj=description.create
lnkObj("index").value=98
B().p().link(lnkObj).click
or
b().p().link("index:=98").click
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / murali.nachahally
set odes=description.create
odes("htmltag").value=linkbtn
coll=browser("browname").page("page name").frame("frame
name").cheildobjects(odes)
msgbox coll.count
for i=0 to coll-1
if i = 99
coll(i).set "ON"
browser("browname").page("page name").webedit("link").set click
end if
next
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / praveen
Using index of the link.As index starts from zero u can fin
the index of required link and then perform the required
operation.
| Is This Answer Correct ? | 2 Yes | 2 No |
How to create a run time propertyfor an object?
Which version of QTP is using by companies nowadays?
What is the extension of the qtp local repository?
What is a checkpoint? How many check points are there in qtp?
What are the different types of functions available in qtp and explain ?
how can we handle exceptional handling in qtp
To count the no of links present in the yahoo home page i have written the script like this Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile ("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo! India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing While running the script it showing error that object "yahoo"isnot found in the object repository. Is there any setting before running the script? if yes what is the steps for it.Im using QTP9.0
what is descriptive programming?
Please explain me frameworks & how to generate the scripts in framework
Is there any site to download QTP....otherwise tell me the way how to get the QTP sofware??????????????????? Thnx in advance
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
In QTP how to interact tool and application build?