11-20-2013 04:59 AM
I am testing a .Net Application where in which I want to select a row from data table by double click on it
The Scrip is creating by QTP is
SwfWindow("Welcome").SwfWindow("Encounter").SwfWindow("CPT Codes").SwfTable("lstDisplay").SelectRow 0
and I try this script but it is not working
SwfWindow("Welcome").SwfWindow("Encounter").SwfWindow("CPT Codes").SwfTable("lstDisplay").DblClick 5,89
I just want to double click on row 0
can anybody help me how to resolve this?
11-20-2013 11:38 PM
To click on a particular row use this method: SwfTable().SelectRow 0
To dblClick on a particular row use this method: SwfTable().ActivateRow 0
When you use SwfTable("lstDisplay").DblClick 5,89 -> it will click on the co ordinates for that table. So 0,0 will point to left top corner of the table and so on. Hence by using dblClick method on a table, you will not be able to clearly use it on rows or cells particularly.
11-21-2013 01:44 AM
This is not working
SwfWindow("Welcome").SwfWindow("Encounter").SwfWindow("CPT Codes").SwfTable("lstDisplay").ActivateRow 0
It give the "General Run error"
SwfWindow("Welcome").SwfWindow("Patient Encounter").SwfWindow("CPT Codes").SwfTable("lstDisplay").ActivateRow 0
11-26-2013 09:46 AM
Try device replay.
Take first the position on screen of the table
note: abs_x and abs_y return the left top corner of the table
then use dive replay taking the base the x and y coordinates
set DeviceReplay = CreateObject("Mercury.DeviceReplay")
set DeviceReplay = nothing
Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.
Also remember if you have a valid contract with HP feel free to visit our FT/QTP Support Customer Forums: http://h30499.www3.hp.com/t5/Functional-Testing-QT
You can create an account with your HP credentials
11-27-2013 01:43 AM
Is this method not working for this row only or for all? How about "SelectRow 0" - is it giving any error messages?
Please also try with ActivateCell with the row you want selected and column 0.
Another suggestion is to try with the table's internal methods through .Object property: http://support.openview.hp.com/selfsolve/document/
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
01-08-2014 06:33 AM
I've had a similar issue with using our swftable objects in our .NET application. SelectRow was working before upgrading to UFT 11.53. Now, it no longer works.
In particular application, I only needed to highlight a row and then select one cell within it. I was able to do a workaround using the following code...
I used the GetColumnNo("ColumnName") function to get the correct column reference.
Hope this helps, but really hoping that HP fixes the issue with the SelectRow function:)