Page 1 of 1

How to pick the GridControl cell Value using renorex

Posted: Fri Aug 05, 2011 4:11 pm
by Hari
Hi,
Using ranorex I want to pick the GridControl Cell value like- ANDHRA, For that I am using the Existng code
from your Forum But Exception is comming Like -This is not recognized path.
But I am picking the path of particular cell for gridControl using RanorexSPY.
I have already added all referances and namespaces also.

I am using the Code--------


Ranorex.UIAutomation uia = "/form[@controlname='Form1']/table[@controlname='dataGridView1']/row[@accessiblename='Row 0']/cell[@accessiblename='Name Row 0']";
string value = (string)uia.AutomationElement.GetCurrentPropertyValue(ValuePattern.ValueProperty);

I request to you please send thesolution As soon as possible .

Regards,
Hari

Re: How to pick the GridControl cell Value using renorex

Posted: Fri Aug 05, 2011 5:26 pm
by Ciege
Hari wrote:
Ranorex.UIAutomation uia = "/form[@controlname='Form1']/table[@controlname='dataGridView1']/row[@accessiblename='Row 0']/cell[@accessiblename='Name Row 0']";
string value = (string)uia.AutomationElement.GetCurrentPropertyValue(ValuePattern.ValueProperty);
Is there a reason you are using Ranorex.UIAutomation rather than Ranorex.Cell to get the cell?

You can try something like this (if you want to keep it hard coded).

Code: Select all

 Ranorex.Cell MyCell= "/form[@controlname='Form1']/table[@controlname='dataGridView1']/row[@accessiblename='Row 0']/cell[@accessiblename='Name Row 0']";  
string MyString = MyCell.Element.GetAttributeValue("AccessibleValue").ToString();

Re: How to pick the GridControl cell Value using renorex

Posted: Mon Aug 22, 2011 1:05 pm
by Hari
Hi,
This is not a suitable solution as I want.

Re: How to pick the GridControl cell Value using renorex

Posted: Tue Aug 23, 2011 8:21 am
by Support Team
Hi,

Ciege already asked
Ciege wrote:Is there a reason you are using Ranorex.UIAutomation rather than Ranorex.Cell to get the cell?
I ask you again. Is there a reason why you use UIAutomation for WinForms?
Hari wrote:This is not a suitable solution as I want.
The solution provided by ciege is exactly the solution you need for WinForms.
Would it be possible to post us a Ranorex Snapshot of your entire solution, then we can provide you another solution?
How to create a Ranorex Snapshot

Regards,
Peter
Ranorex Team