Use RanoreXPath for test automation
It is not required to use RanoreXPath for test automation. It’s also possible to search for UI elements or forms using several different Find methods to search and/or filter for UI elements.
The user guide chapter ‘Code examples’ provides the necessary information Hands-on application topics > Code examples
Besides this, Ranorex provides a fundamental and easy-to-understand introduction to RanoreXPath with lots of syntax examples for you to use, apply, and raise your understanding. Once you are familiar with RanoreXPath, it is easier to perform your UI-elements tracking challenges.
The concept of RanoreXPath is introduced and explained in detail in Ranorex Studio advanced > RanoreXPath > Introduction
RXPath is no longer valid on playback
Below, you can find some solutions when RXPath is no longer valid on playback.
- Run Ranorex Studio in Maintenance Mode.
Maintenance Mode allows you to identify points of failure during test execution so that you can fix errors without having to wait for the entire test to complete.
- Update RanoreXPath settings slider
It is suggested to combine robustness and speed for your paths, but if the paths are failing then Robustness is preferred. This allows your paths to become more resistant to UI changes.
- Re-track the elements
Sometimes simply re-tracking the elements will fix broken paths.
This can happen if the previous paths aren’t dynamically created or certain UI elements have changed in your application.
Different RxPaths upon updating Ranorex Studio
If you encounter different RxPaths when updating between major Ranorex Studio versions, your tests may fail.
Frequently updating the paths and maintaining the test scripts is generally recommended. This will ensure that you use the latest available technology for RxPath generation and help you maintain your tests.
In some cases where updating paths is not an option and you need the old paths but want to update to the latest Ranorex Studio version, here is what you can do:
- Go to Settings > Plugins > WPF (if your application is in .NET Framework) or WPF.Core (if your application is in .NET Core)
- Change the Legacy paths without ContentPresenter elements setting to True and click OK.
- Restart your Application Under Test (AUT)
- Run your tests
This optional setting was introduced to support the older paths that were created using versions prior to Ranorex Studio 10.7.6.
With this setting enabled, you should experience the same or similar paths as in the previous versions.
Keep in mind, that if the application’s structure changes then the paths will change as well. It is always recommended to adjust the testing scripts to match any development changes in your Application Under Test(AUT).