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

Does QTP record on Objects created on XWindows Environment?

0 Answers   Infotech,


what is standalone database

1 Answers   Wipro,


In Developer view it is a high priority defect & in tester view it is a low severity defect what is that how to define with an example

2 Answers   Broadridge,


I am verifying the actual vs the input value to make sure that they been entered correctly. In the Global Sheet I have a column called Customer with the multiple names in each row and now I am trying to capture the value during runtime under the column name Customer_in_Apps. Somewhat it works but during runtime the values are being stored in each column vs each row i.e., Customer_in_Apps, Customer_in_Apps1. Automatically it add columns instead of rows. row=datatable.getsheet("Global").GetRowCount for x=1 to row datatable.getsheet("Global").SetCurrentRow(x) Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Val1=Datatable.Value("Customer",dtGlobalSheet) Val2 = Datatable.GlobalSheet.AddParameter("Customer_in _Apps",runtimevalue) If (trim(Val2)=trim(Val1)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &_Val2 else Reporter.ReportEvent micFail, "Customer validation unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &Val2 End If Next

3 Answers  


How to give Table check points?

4 Answers   ssinformatics,






Hi All I'm new in QTP. I'm trying to make test cases for login on Flight.exe . I have parametrise the agentname and password field. So wen wromg agent name or password is entered it show a dialog box with proper message(Like: "Wrong Password" or :Please enter Password" etc) and OK button. I have created If else block. Now my problem is i want to make checkpoint on error message Dialog box. But each time i create a checkpoint it shows same text message. So how i can check that message is there or not.

2 Answers  


When I parameterize a script then for each iteration script is executed from begining to end. If I want to execute some middle steps multiple times using Parameterization (avoiding begining and end steps), what is the solution of this (e.g. total steps are 1 2 3 4 5 and i want 2 3 4 only(not 1 nd 5)

2 Answers  


Define Error Pane of UFT?

0 Answers  


1. Pls can anyone give me the descriptive programing script to find the number of edit boxes in a login window in flights reservation (windows application only not web). 2. Using descriptive programing, how do you handle changing URLs. Pls anyone, very urgent

2 Answers   Infotech,


How to Synchronize the Browser at Field level? For example if you put Browser.sync(), its waiting upto for that Browser sync only. It should wait total Browser get upload with fields.

3 Answers   IBM, TCS,


what is localisation testing and globalisation testing? what is the difference between them?

1 Answers   CDC Software,


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

0 Answers  


Categories