Ranorex Studio is renowned for its robust no-code capabilities, which allow tests to be automated seamlessly across web, mobile, and desktop applications. Beyond its intuitive recording features, Ranorex Studio allows custom code module creation using C# or VB.NET,...
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:
Support Corner: API Testing and Simple POST Requests
Ranorex Studio is renowned for its robust no-code capabilities, which allow tests to be automated seamlessly across web, mobile, and desktop applications. Beyond its intuitive recording features, Ranorex Studio allows custom code module creation using C# or VB.NET,...
The Top 10 Test Automation Challenges
It’s difficult for any IT organization to execute DevOps effectively without test automation. However, it’s often easier said than done. Overcoming the challenges of automated software testing can end up slowing down product delivery and impacting quality, the exact...
7 Best Android Testing Tools
There are more and more Android testing tools available for mobile app developers. These are our favorites for performance, accessibility, and security.