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 |
To which environments does a QTP support?
suppose i can done the project , that project have 4 modules in that one module they have many links(web pages).in that time i can say i can work on some links? or total module?
How do you copy a value from a cell in an msexcel sheet saved on the desktop into QTP's datatable when the co-ordinates of cell are given?
Why do we go for Qtp? What are the advantages of qtp? Diff between winrunner and Qtp?
How to make arguments optional in a function?
any challange that faced in your project? (please give me some examples in your project?
What does SPLIT and JOIN commands do in Vbscript?
6 Answers Ordain Solutions, UBC,
Hi PLZ explain User Defined Functions in QTP with eample?
How to find the name of the machine where you are running your automation scripts in qtp?
Is the provision for integrating QTP with QC ,available from the version 9.0 onwards only or even 8.2 version has such provisions?
what r the executing modes in QTP
I am using descriptive programming for my project.when QTP deosn't identity or recognize a object by record and playback method,is it possible to make QTP identify that object using descriptive programming? Note: The object doesn't have unique properties and same properties used in Record and playback are only available, no extra properties are defined.