Support Predicate and Class Chain for iOS object locators on the interface to improve search speed


#1

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: https://appiumpro.com/editions/8 and here: https://appiumpro.com/editions/35

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