Reputation:
We are trying to create some tests that reference an vendors custom grid. Unfortunatly QTP only recognises it as a WinObject which is quite useless. We need to be able to navigate the grid and change cell values, double click on a cell(without using X,Y co-ordinates) etc.
Ideally we want to get QTP to understand that this object is a grid and treat it as one.
Any help would be greatly appreciated.
Thanks
Jon
Upvotes: 0
Views: 4000
Reputation:
It is resonable to send the request to Support Center. If they will get a big number of requests - they will add support for your grid-vendor.
Upvotes: 0
Reputation: 61695
Same thing for Infragistics. They have a plug-in for QTP for the UltraWinGrid etc.
http://www.infragistics.com/dotnet/testadvantage.aspx#Overview
Upvotes: 0
Reputation: 101456
If the grid in question happens to be a Stingray Objective Grid, QTP has plugins specifically for that.
Upvotes: 0
Reputation: 2482
What vendor?
I have a few suggestions:
You may be able to programmatically get/set the grid properties using the .Object property. .Object provides access to the underlying native properties and methods of the object, as opposed to the QTP methods and properties. You could do something like the following pseudo-code to set focus to a cell and change the value. Your code would differ depending on the vendor implementation. Consult the vendor's documentation to find out what methods and properties you would be able to use.
WinObject("mygrid").Object.CurRow = 1
WinObject("mygrid").Object.CurCol = 1
WinObject("mygrid").Object.Value = "my new value"
Upvotes: 1