Initial steps to finding selectors for an application.
Troubleshooting Steps/ Strategies
UiExplorer
- Use UiExplorer to try and generate the selector
- Try using the Visual Tree to find the element that a selector needs to be generated for
- Typically the application will either show up as one element or certain elements within the application will not have selectors (i.e. It may be possible to select a table, but not individual elements in a table)
- Try changing the Framework mode. (It can be set to: Default, Active Accessibility, or UI Automation)
Best Practices
- Make sure that scaling is set consistently on all environments. Recommended that 100% scaling is used. In some very rare circumstances the selector will change based on what scaling is set to
- Using consistent selector attributes such as 'aaname', 'id', etc. as opposed to 'idx'
- Check the integrity level of the target application. Integrity levels control trust levels between applications. A low level application cannot interact with a high level application. Typically UiExplorer will give an access denied error when trying to interact with the application but the automation might just return a selector not found error
- Try updating to the latest activities package for the activity experiencing issues with selectors else looking through the release notes for that activity's packages and identifying any applicable version where the bug was fixed
- Try adding a delay of 2-3 seconds before the activity executes either via Delay Activity or set the WaitForReady property to Complete to verify that the activity is actually running,
Debug Tools
- Try using the tools that can be downloaded at https://accessibilityinsights.io/
- This is a free set of tools from Microsoft that can be used to determine if an application is accessible.
- Download and install this tool on machine
- Open the tool and highlight on application
- If a UiElement is not accessible using the above tool, it will probably not be accessible with UiPath.
- If an element is accessible with the accessibility tool, but not UiPath, it is recommended that a ticket be opened with UiPath.
Workarounds
If issues are still persistent while grabbing selectors, look into the following possible workaround activities,
- Type Into
- Send Hotkey
- Wait Image Appear
- OCR Activities
- About The UI Automation Activities Pack : Computer Vision
- If using the REFramework template, try creating a separate workflow not using that template and see if that works.