Microsoft UI Automation is the new accessibility framework for Microsoft Windows, available on all operating systems that support Windows Presentation Foundation (WPF). see - http://msdn2.microsoft.com/en-us/library/ms747327.aspx
I was hoping that xamRibbon will fully support this so that the if we decide to use this in our application then we automatically have an accessible application. However I have noticed that this currently isn't the case. e.g. ButtonTool items aren't accessible but RadioButtonTool are. I had hoped that using the AutomationProperties as extension properties (in xaml) to the control will suface into the UI, but they don't .
Is there anything I can do to make this work from my end? Will the release version fully support UI Automation?
I would be happy to provide further details and examples. If you require them, please let me know.
Hello Hirani -
Thanks for your post. You are correct that we do not have support for WPF's UI Automation in the Preview build of the XamRibbon. At this point it appears that UIAutomation support will not make it into the final release. We are familiar with how UI Automation works - in fact the XamDataGrid, XamDataCarousel and XamCarouselListBox (all released as part of NA for WPF 7.1) all have support for UIAutomation.
We recognize that this is important framework functionality that developers will expect all WPF components to support, but unfortunately we are not able to squeeze this development task into the 7.2 schedule. After much discussion we've made the decision to release the XamRibbon without UI automation support, and add this support in a follow-on hotfix or release.
I hope this helps.
JoeM
"joem" wrote in message news:10776@forums.infragistics.com... Hello Hirani - Thanks for your post. You are correct that we do not have support for WPF's UI Automation in the Preview build of the XamRibbon. At this point it appears that UIAutomation support will not make it into the final release. We are familiar with how UI Automation works - in fact the XamDataGrid, XamDataCarousel and XamCarouselListBox (all released as part of NA for WPF 7.1) all have support for UIAutomation. We recognize that this is important framework functionality that developers will expect all WPF components to support, but unfortunately we are not able to squeeze this development task into the 7.2 schedule. After much discussion we've made the decision to release the XamRibbon without UI automation support, and add this support in a follow-on hotfix or release. I hope this helps. JoeM http://forums.infragistics.com/forums/p/832/10776.aspx#10776
Thanks for the quick reply. Any suggested workarounds?
Here is one example of a work-around. However, please keep in mind that this work-around is a big stretch and will only solve the problem in certain instances:
If you're displaying an image (through the LargeImage or SmallImage properties) in the ButtonTool, the image itself can be located and is accessable to the UI Automation classes. By getting the image, you get the image location, which is overtop of the ButtonTool location. Obviously, you cannot get the ButtonTool control patterns, but you can use the mouse and the image coordinates to interact with the button, but the ButtonTool must be visible and it can't be off-screen.
Also, note that the image in the ButtonTool has very generic attributes making it difficult to obtain the correct one (AutomationID: "image"; ClassName: "Image"). In order to get the image, you have to search by these properties and iterate through and select the correct one. The best way to do this is to first obtain the ButtonTool's parent AutomationElement, perform a FindAll() search matching the criteria mentioned above with a scope of just the immediate children. The results can be somewhat predictable at that point, so use trial and error to get the correct result.
Infragistics: there are many who have spoken already about needing support for UI Automation with this control, and I would like to add myself to this list. Please publish a hot fix.
There is further UIAutomation support for the xamRibbon and its elements in the latest release - 2008.2.
Andrew Smith"] There is further UIAutomation support for the xamRibbon and its elements in the latest release - 2008.2.
Does this release support UI Automation specifically in the ButtonTool control?
tpaesl said: Andrew Smith"] There is further UIAutomation support for the xamRibbon and its elements in the latest release - 2008.2. Does this release support UI Automation specifically in the ButtonTool control? We are still using 2008.1 for the application that we require automation support for the ButtonTool. However, I did find that we also have 2008.2 so I tested it and the same problem remains. The 2008.2 release will not help us in that regard.
Andrew Smith"] There is further UIAutomation support for the xamRibbon and its elements in the latest release - 2008.2. Does this release support UI Automation specifically in the ButtonTool control?
We are still using 2008.1 for the application that we require automation support for the ButtonTool. However, I did find that we also have 2008.2 so I tested it and the same problem remains. The 2008.2 release will not help us in that regard.
You should contact the support group so you can be notified when the next 8.2 hotfix is released.
I'm sorry but after some further research it seems that the internal version that I was using did include automation support but automation support had not made it into the release version. This should be included in the next hotfix of 8.2 - note this did not make it into the first 8.2 hotfix which is either available right now or will be very shortly but will be in the 2nd hotfix.
We did not provide automation peers for the xamRibbon tools, etc. until the 2008 Vol 2 release. When I run one of the sample applications and use UISpy against that version it does see the ButtonTool as an element, can use the invoke pattern, etc.
I have the same problem, I want to do UI automation testing using on a WPF application that use some infragistics controls. Some of them (Like the Ribbon's buttonTools or ContentPane) does not support UI automation.
For example, when I have a ButtonTool in a Ribbon and I look at the application using UISpy, I do not see a control of type button, I see an image (ControlType = ControlType.Image)
If I set some automation properties (e.g AutomationProperties.AutomationID), these properties are not visible within UI spy of UIAVerify.
Why does Infragistics WPF controls does not implements providers for UIAutomation?
Thanks