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
Answers were Sorted based on User's Feedback
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 |
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 |
What are the factors on which script execution time is dependent?
take one exmple and write on that discriptive programe in qtp?
how do you invoke the application through QTP?
what is the silent mode in WR?
what is selective recording ? and normal recording?
Give me exact application where we should use low level recording?
How do Parameterization and Data-Driving relate to each other in QTP?
WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent
how to choose the framework in qtp ? 2)when we go for the descriptive programming ?
Explain the concept of object repository and how quicktest professional recognises objects?
somebody please say me why we go for using regular expressions,actions.what is the main and exact use of this in real time applications.real time testers pls answer my question with example if u can