Page 1 of 1

AutomationID not recognized

Posted: Mon Mar 21, 2011 9:28 am
by andreas.tastler
Hi,

We test a wpf application which is running under .NET Framework 4.0. There are several elements in the visual tree (in tab pages), which are built from a child class of a custom control of us. During it's initialization, we set the automationid=classname of the specific child.
Now, I have two environments where I build and run testscases. On one machine, the classname and automationid property are available, on the other only the classname is set the automationid is empty.

Both machines have:
Same Version of the Testapplication ;-)
Ranorex: 3.0.0.11639
.NET: 4.0.30319.1

The machine which does not recognize the automationid is a 64Bit Windows 7 Workstation. I tried the 32bit and 64bit Version of Ranorex Spy. The machine which is working correctly is a 32Bit Windows Vista.

There are other elements, where the automationid is working perfectly.
Does anyone have an idea how to identify the problem?

Thanks
Andreas

Re: AutomationID not recognized

Posted: Mon Mar 21, 2011 11:42 am
by Support Team
Hi,
andreas.tastler wrote:There are other elements, where the automationid is working perfectly.
Does anyone have an idea how to identify the problem?
Please can you post us two Ranorex Snapshots of the entire application to check the difference between them? One of the working and one of the not working application.
How to create a Snapshot

Regards,
Peter
Ranorex Team

Re: AutomationID not recognized

Posted: Tue Mar 22, 2011 7:11 am
by andreas.tastler
Hi

There are two Snapshots in the attached zip file.
The one which is working is AutomationID_OK.rxsnp

The element I told you about is at

/form[@automationid='IsagClientMainForm']/tabpagelist[@automationid='tabMain']/tabpage/container/element[@automationid='dlgOrgeinheitSuchen']


Regards
Andreas

Re: AutomationID not recognized

Posted: Tue Mar 22, 2011 2:10 pm
by Support Team
Hi,

Thank you for the Snapshots.
It seems to be a bug in the UIAutomation Framework or in our WPF-Plug-In, we try to nail it down with our WPF specialist. But as workaround you can use the "classname" attribute for this element instead of the "automationid" attribute. This attribute should work for both systems. If this is a bug on our side we will fix this with a future release of Ranorex.

Regards,
Peter
Ranorex Team

Re: AutomationID not recognized

Posted: Wed Mar 23, 2011 8:37 am
by andreas.tastler
Hi

Thank you for analyzing the snapshots. I have already used the classname to identify the elements. Since there were no other issues with the AutomationId, everything works fine for now.

Regards
Andreas

Re: AutomationID not recognized

Posted: Wed Mar 23, 2011 10:03 am
by Support Team
Hi,

Fine that this workaround is okay for you. We will inform you about the outcome of our further analyzes.

Regards,
Peter
Ranorex Team