Hi..friends can anybody write the script for this question...
Am having some 20 nos of links in a web application, i want
to click some 5,13 & 17th links. So please....can anybody
give the answer....???

-->Hani<--

Answer Posted / ashok kumar

Set obj_Link = Description.Create()
obj_Link("micclass").value = "Link"
Set it_Link =
Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(obj_Link)
For i = 0 to it_Link.count-1 step 2

it_Link(i).Click 'it click +2,4,6....

Next

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT

2051


Hi How to retrieve data from web element line by line?

1571


what is vmodel?advantages and disadvantages of vmodel?

1612


how to post xml data from QTP scripts to any application?

1499


Explain different recording modes?

578






On what document base Descriptive programming is written if build is not yet ready ?

873


What are the common defects found in your project? (in qtp interview)

1612


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3264


Hai anyone please "Explain about Framework in QTP?"

1614


if our qtp vb Script may be Currepted then What we want do?

1479


am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)

1277


Discuss the QTP Environment?

622


Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1421


What is the syntax to call one action in another?

548


What are the methods of the TextStream object that are used for reading from a text file?

1687