DevExpress table and UIAutomationValue Value

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
werner
Posts: 2
Joined: Thu Oct 27, 2011 1:39 pm

DevExpress table and UIAutomationValue Value

Post by werner » Thu Oct 27, 2011 1:55 pm

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

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress table and UIAutomationValue Value

Post by Ciege » Thu Oct 27, 2011 3:55 pm

Can you post a snapshot of RanorexSpy while pointing it to your DexExpress table please?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

werner
Posts: 2
Joined: Thu Oct 27, 2011 1:39 pm

Re: DevExpress table and UIAutomationValue Value

Post by werner » Thu Oct 27, 2011 4:29 pm

Hi Ciege,
I attached a "censored" snapshot: do you think it's enough?

Thank you very much for your help
W
You do not have the required permissions to view the files attached to this post.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DevExpress table and UIAutomationValue Value

Post by Ciege » Thu Oct 27, 2011 6:18 pm

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()
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

gemur
Posts: 1
Joined: Wed Feb 18, 2015 3:14 pm

Re: DevExpress table and UIAutomationValue Value

Post by gemur » Wed Feb 18, 2015 3:26 pm

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