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

PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

5934


Explain runtime dynamic settings?

2022


How do know the number of browsers opened?

623


What are the check points can be inserted without recording?

596


Is it possible to call win runner script in qtp?

623






What are benefits of qtp?

579


What are the different types of recording modes in qtp? Which will be used when?

561


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

561


Differentiate the type of test cases which can be automated and which cannot be automated?

565


What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)?

592


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

2891


What are the differences between quicktest professional (qtp) and winrunner?

568


How can you pass value one action to another action?

553


Explain the difference between data driven testing and parameterization ?

583


I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.

1298