Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help about the DataGrid object
#1
Not Solved
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:

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
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.


Attached Files Image(s)
   
Reply
#2
Not Solved
1. Can you attach a spyshot of the object ??

Winobject indicates it is a custom object. Was there any third party tool used by dev to build these objects ??

On what platform is this object built on ?? Is this a .Net or windows or web ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Not Solved
Hi Basanth,

I am very new to QTP. And I don't know about the SpyObject and dont know in which platform, the Dev team build it. Thanks for your quick reply.
Reply
#4
Not Solved
Okay. No Problem. Lets take it step by step.

1. On your QTP window, Navigate to Tools-> Object Spy.
2.On the object spy click on the pointing Hand and then move the pointer to the Datagrid and click on it.
3. On the Object Spy you will find that it will capture the objects properties and display them.
4. Drag and enlarge the spy and take a screenshot of it and upload it here.

If you have access to a developer who is working on this part of the application, Please ask him the below questions.

1. What kind of a Technical object is the Datagrid ??
2. How was this object developed ?
3. How are you setting the Rows & column data in the datagrid ?

Find the answers and we will move to the next step.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Not Solved
Please find the snap shot of the Object Spy below.
And for the platform query, it must be a Windows platform. But am not sure. Because, the dev team only customizing the application.


Attached Files Image(s)
   
Reply
#6
Not Solved
Can you see if you have a method called Gettextlocation exist for the winobject ?

Try the below and let me know what do you get on the screen,
Code:
rowcount = Window("Product").Window("Product Selection").WinObject("GXWND").Object.Rows.Count
msgbox rowcount

itemscount = Window("Product").Window("Product Selection").WinObject("GXWND").Object.Items.Count
msgbox itemscount
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] [WPF] DataGrid: get items of ControlTemplate robertosalemi 0 3,283 07-14-2016, 07:52 PM
Last Post: robertosalemi
  [UFT] [WPF] DataGrid: check if vertical and horizontal scrollbars are visible robertosalemi 0 2,248 07-13-2016, 06:33 PM
Last Post: robertosalemi
  DataGrid: double click on selected row robertosalemi 0 4,274 05-12-2016, 03:00 PM
Last Post: robertosalemi
  WPF DataGrid is not recognizing properly suvenduitc@gmail.com 0 3,140 02-13-2014, 03:27 PM
Last Post: suvenduitc@gmail.com

Forum Jump:


Users browsing this thread: 1 Guest(s)