AutomationID Best Practices

I am trying to find out whether or not it is a best practice to set Automation properties (AutomationId, HelpText, Name) for WPF controls as a standard development procedure. It doesnt appear that you need to define these properties unless you are creating a custom control, and that in their absence UI Automation would be based on the Name of the control.

We are just getting started with UI Automation in WPF and our main focus today is UI Automation for QA Testing. However, other accessibility features are also on the horizon. Are there other benefits to setting automation properties?

Thanks in advance.

JAtkins

[682 byte] By [JAtkins] at [2008-2-28]
# 1

It should not be necessary for an app to set UI Automation properties on a control unless the default information received from the control is wrong.

A good UI design should enable UI Automation to return the correct values. The Name property, for example, comes from the label of the control, if any, provided it is in the correct tab stop order.

It's always a good idea to run UI Spy against your app to make sure everything is showing up as it should be. If an item appears incorrectly, you will want to consider changing the corresponding UI Automation properties to enable the right behavior.

PeterDonnelly-MSFTUE at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...
# 2
Thanks Peter. That answers my question. Thanks again for the help.
JAtkins at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Microsoft UI Automation...

Software Development for Windows Vista

Site Classified