Mobile object recognition issues


I am working with an Ionic/Cordova Hybrid application. Using Appium we can set the Xpath for the page and our objects. An example from our eclipse code for our site configuration screen:

privatestaticfinalString FORM_LOCATOR= “//div[contains(text(),‘Site Configuration’)]”;

privatestaticfinalString URL_FIELD= “//input[@name=‘loginUrl’]”;

privatestaticfinalString URL_LOGIN_BUTTON=“//button[@type=‘submit’]”;

When I try to replace the current Xpath which is:


With"//div[contains(text(),‘Site Configuration’)]

The object is not found. I have also tried to use the XPath tab and CSS to see if we have a different result.

I have a similar issue when I attempt to use the Attributes for the application. In our login we have two edit boxes.

They are named and thus I have set the Attributes as follows:

//*[@class = ‘android.widget.EditText’ and @name = ‘username’]

//*[@class = ‘android.widget.EditText’ and @name = password]

The username is entered and then the next step the system clears the username and types the password in the username field.

I have tried the following XPath as well:

privatestaticfinalString USERNAME_FIELD= “//input[@name=‘username’]”;

privatestaticfinalString PASSWORD_FIELD= “//input[@name=‘password’]”;

I have tried to set the CSS as well.

Is the XPath a true XPath or is this something that Katalon has created? How do we use similar techniques as above to work with the XPath since the Attributes do not seem to be working? Does the XPath and CSS work for mobile testing?

Thank you,


Screen Shot 2018-11-20 at 11.12.10 AM.png

Screen Shot 2018-11-20 at 11.20.31 AM.png

Additional note: Unless the generated Xpath is present, the objects in the Mobile Spy are not identified.