Page 1 of 1

DevExpress table and UIAutomationValue Value

Posted: Thu Oct 27, 2011 1:55 pm
by werner
Hi guys,
I'm just a beginner with Ranorex and I'm trying to find a way for accessing the UIAutomationValue Value of an element of a DevExpress table.
I can see that property in Spy and also in the Properties (Live Element section), but trying to use it
via the objects' hierarchy (MyRepository.MyForm.ContainerDataPanel1.MyElement1) I don't find it and so I can't use it.

So I've a question:
how to access that property in my C# user code?
More details: I need to verify the content of the element MyElement1 and compare it with a string.

Thank you very much
W

Re: DevExpress table and UIAutomationValue Value

Posted: Thu Oct 27, 2011 3:55 pm
by Ciege
Can you post a snapshot of RanorexSpy while pointing it to your DexExpress table please?

Re: DevExpress table and UIAutomationValue Value

Posted: Thu Oct 27, 2011 4:29 pm
by werner
Hi Ciege,
I attached a "censored" snapshot: do you think it's enough?

Thank you very much for your help
W

Re: DevExpress table and UIAutomationValue Value

Posted: Thu Oct 27, 2011 6:18 pm
by Ciege
Since you asked this way:
how to access that property in my C# user code?
that's how I will answer it...

1st, if you get a reference to the object you want, for example the cell that you have shown, you can then get the property of that object and set it as a string variable.

For example:

Code: Select all

Ranorex.element myElement = xPath;
string myUIString = myElement.GetAttributeValue("UIAutomationValueValue").ToString()

Re: DevExpress table and UIAutomationValue Value

Posted: Wed Feb 18, 2015 3:26 pm
by gemur
Worked for me to get the value of an infragistics grid cell:

private void Init()
{
string gmTEST;
// Your recording specific initialization code goes here.
gmTEST = repo.MainWindow.TextBlock_GEMUR.Element.GetAttributeValue("UIAutomationValueValue").ToString();
Report.Info("### gmTEST=|" + gmTEST + "|");
}

BR
Georg