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



Write code for ,We have a web table with rows and columns like EmpID EName Action 1 ..

Answer / 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

Write code for ,We have a web table with rows and columns like EmpID EName Action 1 ..

Answer / 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

More QTP Interview Questions

What are the factors on which script execution time is dependent?

0 Answers  


take one exmple and write on that discriptive programe in qtp?

1 Answers  


how do you invoke the application through QTP?

1 Answers  


what is the silent mode in WR?

1 Answers  


what is selective recording ? and normal recording?

1 Answers   iSoft,






Give me exact application where we should use low level recording?

6 Answers   CTS,


How do Parameterization and Data-Driving relate to each other in QTP?

0 Answers  


WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?

9 Answers   CTS,


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

8 Answers  


how to choose the framework in qtp ? 2)when we go for the descriptive programming ?

2 Answers   Syntel,


Explain the concept of object repository and how quicktest professional recognises objects?

0 Answers  


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

4 Answers  


Categories