I used to use Katalon Studio for quite a long time on my mobile project. Things come into our project that Katalon Studio aka Appium wrapper (not offensive meaning) used Xpath to locate mobile objects by default. There is nothing wrong with it as Xpath is a common standard for locating an object on-screen.
However, using Xpath as default for iOS objects are not recommended due to it is very slow in finding the matching object, refer here: Appium Pro: How to Find Elements in iOS (Not) By XPath and here: Appium Pro: Writing XPath Queries That Work
We change to use Predicate and Class Chain instead in our code. Clearly, it does improve iOS execution speed overall because one of the speed factor affecting it previously is Xpath.
In our speed comparison:
- Before: 10 seconds
- After: 1-2 seconds
=> So it does reduce execution time to be about 80-90%
So this topic is about having a place on UI of object locator interface to support Predicate and Class Chain syntax as alternative options. Or better to capture iOS object locators using Predicate is the best.
Regards