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
What is the differences between image check point and bit map check point?
How to define array in qtp?
In qtp, explain what is crypt object
What is the diff between image and bitmap check point?
What are the types of object repository?
if our qtp vb Script may be Currepted then What we want do?
What is a data driven test in qtp?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
Explain quicktest professional testing process?
What is the difference between rational rose and QTP?
What are the technics follow in writing VB script?
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
In qtp, how you can use xpath to identify objects?
What is fragmentation and paging?
How you can find length of array in qtp?