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)

Rnum = Browser("Browser name").Page("Pagename").webTable("TableName").GetRowWithCellText(2)
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


Please Help Members By Posting Answers For Below Questions

Where we can use the analog mode and where we can use the low – level mode?

773


Brief the process of testing with UFT?

799


Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?

2079


How to record application running on the Virtual machine?

839


what could go wrong with test automation?

1727


Write a script to customize the test results in PDF and HTML format.

2291


How to use transactions in qtp?

722


when will you do debug your script? and explain that process?

1638


Explain more about the Test Fusion Report of QTP?

776


What are the 3 main stages involved in testing with qtp?

787


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

1798


Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

6835


your coming from electrical backgroung..but y ur coming to software side?

1548


Write a script to verify font style and color of a windows object using descriptive programming

1055


What are private functions in QTP? How they can be called from the function library?

791