Write code for ,We have a web table with rows and columns like
EmpID EName Action
1 ABC Edit Delete
2 XYZ Edit Delete
3 PQR Edit Delete
In the above Table the last column has two links we have to click first link based up on EmpID =2
Answer Posted / mogal
RC = Browser("Browser name").Page("Pagename").webTable("TableName").RowCount
CC = Browser("Browser name").Page("Pagename").webTable("TableName").ColumnCount(1)
for iLoop = 1 to RC
If Browser("Browser name").Page("Pagename").webTable("TableName").GetCellData(iLoop,1) = 2 Then
Rnum = iLoop
Exit for
End if
Next
for jLoop = 1 to CC
If Browser("Browser name").Page("Pagename").webTable("TableName").GetCellData(1,jLoop) = "Action" Then
Cnum = jLoop
Exit for
End if
Next
Set ReqLink =Browser("Browser name").Page("Pagename").webTable("TableName").childItem(Rnum,Cnum,"Link",0)
ReqLink.Click
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”
What is the difference between rational rose and QTP?
i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
what is clean sweep?
To which environments does quicktest professional (qtp) supports?
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?
Where is the Bitmap checkpoint information stored?
how to post xml data from QTP scripts to any application?
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?
Mention what are the different types of recording modes in qtp? Which will be used when?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?