Setting UI Automation Options

Enable or disable Microsoft UI Automation (MSUIA) support, specify custom attributes for locator generation, and specify attributes that should be excluded from locators.

Enable UI Automation support and specify which attributes and values to exclude from locators to allow Silk Test Workbench to better identify objects in applications that have implemented UI Automation provider interfaces, for example applications that are based on JavaFX or QT.

Silk Test Workbench includes a sophisticated locator generator mechanism that guarantees locators are unique at the time of recording and are easy to maintain. Depending on your application and the frameworks that you use, you might want to modify the default settings to achieve the best results. You can use any property that is available in the respective technology as a custom attribute given that they are either numbers (integers, doubles), strings, item identifiers, or enumeration values.

You can also retrieve arbitrary properties from applications that have implemented UI Automation provider interfaces and then use those properties as custom attributes. To achieve optimal results, add a custom automation ID to the elements that you want to interact with in your test.

  1. Click Tools > Options.
  2. Click the plus sign (+) next to Playback in the Options menu tree. The Playback subcategories appear.
  3. Click UI Automation.
  4. Set Enable Microsoft UI Automation Support to True to enable Microsoft UI Automation support instead of the normal Win32 control recognition.
    Note: If you are testing against a Java FX application, you do not have to enable the UI Automation support, as Silk Test Workbench enables this out-of-the-box for Java FX applications.
    Note: The UI Automation support overrides the standard technology-domain-specific support. When you are finished interacting with the controls that require UI Automation support, disable the UI Automation support again to resume working with standard controls.
  5. Click the plus sign (+) next to Record in the Options menu tree.
    The Record options display in the right side panel.
  6. Click UI Automation.
  7. To add a custom attribute for an application that has implemented a UI Automation provider interface, type the attributes that you want to use into the Custom attributes text box. Using a custom attribute is more reliable than other attributes like caption or index, since a caption will change when you translate the application into another language, and the index might change whenever another object is added before one you have defined already.
  8. In the Locator attribute name exclude list grid, type the attribute names to ignore while recording. For example, if you want to ignore the attribute name automationid, because multiple controls in your AUT have an attribute with this name, add the automationid attribute name to the list. Separate attribute names with a comma.
  9. In the Locator attribute value exclude list grid, type the attribute values to ignore while recording. For example, the value JavaFX* is added to the list by default, because all JavaFX controls include an attribute value of the form JavaFX<number>. Separate attribute names with a comma.
  10. Click OK.