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

How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?

0 Answers  


What is the another extention name of library file.If that is exist than what's the differnce between them.

1 Answers   Synechron,


suppose the given string str = {"vamsikrishna%%&%*&**"} count the no of vowels and special characters are repeated

2 Answers  


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.

0 Answers  


Is it possible to check the Run time value property of a field through a Database Checkpoint ? Further, is it possible to localize and mention a particular cell , in the database dynamically. My requirement is that I would need to check the status of a particular field , that would change from an "Active" state to a "Stopped" state dynamically.

1 Answers   CTS,






I have application it is one digital clock with all minutes and seconds. you have to identify the time to verify weather the time displayed is correct time or not? How do you automate this scenario?

2 Answers   TCS,


how can i pass parameters into function?

4 Answers   Livetek,


how do u create new test sets in TD

1 Answers  


How does u create new test sets in TD?

1 Answers   Crea,


What are accessibility check point and xml check point?

5 Answers   IBM,


how to create user defined functions in QTP? can any one expalin me with example.. Thanks in Advance for help

4 Answers  


what is the extension for QTP files?

16 Answers   American Solutions,


Categories