Unable to perform click on table cell

Ask general questions here.
Posts: 12
Joined: Tue Oct 06, 2009 7:40 am

Unable to perform click on table cell

Post by kiran.pol » Wed Apr 28, 2010 7:40 am


When i try to spy a cell in a table only the entire table row is hilighted and the cell is not highlited.
In the Ranorex Spy Element Browser the row element is displayed as collapsed and when expanded i am able to see each cell properties with their xpaths. Now when i try to use this xpath to identify and click on the cell ranorex fails to click on the cell

I tried the gollowing

1) Ranorex.Cell cl = <xpath of the cell>
2) Ranorex.Table tab = <xpath of table>
Ranorex.Cell = tab.FindSingle(".//cell[@accessiblename='Row 3']");
but it is not working with the above

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Unable to perform click on table cell

Post by Support Team » Wed Apr 28, 2010 9:51 am


What kind of technology is used for your table?
Can you post or send ([email protected]) us a Ranorex Snapshot?
How to create Ranorex Snapshot http://www.ranorex.com/support/user-gui ... html#c2072

I've tried it with a .Net dataGridView (Spy regonize this control as a table) and it worked as expected.
I used following code and both ways worked:
Ranorex.Cell cell1 = "/form[@controlname='Form1']/table[@controlname='dataGridView1']/row/cell[@accessiblename='Column1 Row 3']";

Ranorex.Table table = "/form[@controlname='Form1']/table[@controlname='dataGridView1']";
Ranorex.Cell cell = table.FindSingle(".//cell[@accessiblename='Column4 Row 3']");
What I observed when I use for example "cell[@accessiblename='Row 3']", Ranorex clicks on the "ROW Button" so the whole row gets marked. But it's the correct behavior because this element is identified by the RxPath (highlighted with Spy).

Ranorex Support Team