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 is risks of testing a project?

5 Answers   AppLabs,


Difference between keyword driven test and DDT?

1 Answers  


Hi PLZ explain User Defined Functions in QTP with eample?

2 Answers   Ordain Solutions,


What does SPLIT and JOIN commands do in Vbscript?

6 Answers   Ordain Solutions, UBC,


Ex : some mail name with surname Email id's there that is string fetch the particular surname only how to get particular surname all emails

1 Answers   Infosys,






can any body give the banking domain concepts/links

0 Answers  


What does ".mst" stands for? (abc.mst)

3 Answers   Infosys,


1. In build1 there is a page with two check boxes and a submit button. You have prepared a script for that page and its working fine. In Build 2 the developers have added two checkboxes in the page. Will the script prepared for Build 1 work for Build 2 or not. If yes, why and if No, why. Remember the developers have not touched the object properties of the textboxes in the page.

3 Answers   ADP,


How will u declare a variable to access multiple actions? a)Dim b)Global c)Public d)Private

1 Answers  


Reverse string without mid or streverse function.

1 Answers   Deloitte,


Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........

0 Answers  


IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?

2 Answers   CTC, Infosys,


Categories