The integration of Robotic Process Automation (RPA) with Artificial Intelligence (AI) has managed to revolutionize business process automation. It's led to improvements in operational efficiency and pioneered the establishment of new standards for test automation. By...
Understanding the basics
A typical UI (whether for desktop, mobile, or web application) is organized into series of containers nested one inside the other. To locate a given UI object, an automated test uses attributes such as the object ID, class, name, and the path to locating it within its container. Some locators are inherently more stable than others.
Watch the video below for a demonstration identifying UI objects in Ranorex Spy. As you watch, notice that Ranorex Spy includes wildcards (*/*) in the path to an object, which increases the reliability of the selector. If there is a change in the hierarchy of the application, the automated test will still be able to find the UI element.
Building stable locators
The following principles help ensure that your automated tests can find your UI objects reliably.
Avoid coordinate-based recognition
Avoid image-based recognition
Avoid using dynamic IDs
Use the shortest path
Additional best practices
The following practices will help make your UI tests more resilient and reduce maintenance.
Use an object repository
Get your developers involved
Troubleshooting object recognition
Even when using stable locators, object recognition can sometimes fail. Below are tips to help you resolve issues with object recognition.
Invisible UI elements
Snapshots
Related Posts:
How Do RPA and AI Work Together?
The integration of Robotic Process Automation (RPA) with Artificial Intelligence (AI) has managed to revolutionize business process automation. It's led to improvements in operational efficiency and pioneered the establishment of new standards for test automation. By...
Test Plan vs Test Strategy Explained
Software development professionals know firsthand the importance of Quality Assurance (QA) in any software project. This essential project component ensures the end product not only meets the client’s expectations but also delivers a seamless experience for the end...
9 Robotic Process Automation Best Practices
Robot process automation (RPA) tools allow organizations to automate essential tasks. They’ve increased in popularity because of their ability to improve the efficiency and accuracy of crucial business processes. RPA processes can access information from...