08-26-2009, 09:31 AM
I am using QTP9.0 version. I am trying to select a particular row from the datagrid. But the problem is, QTP identifies the datagrid as a single object GXWND. But it is not identifying the rows or columns in that datagrid. Please find the screenshot of that Data Grid.
And I tried the following code to select a particular row:
This helps to select a particular row in x & y co-ordinates. But i want to select a defined Product Alias Name which is in Data Table and to select that value, we have to scroll down the datagrid. Please help me for this issue.
And I tried the following code to select a particular row:
Code:
l = Window("Product").Window("Product Selection").WinObject("GXWND").GetROProperty("x")
b = Window("Product").Window("Product Selection").WinObject("GXWND").GetROProperty("y")
r = Window("Product").Window("Product Selection").WinObject("GXWND").GetROProperty("width")
t = Window("Product").Window("Product Selection").WinObject("GXWND").GetROProperty("height")
x = (l+r)/2
y = (b+t)/2
Window("Product").Window("Product Selection").WinObject("GXWND").Click x, y