No longer able to see elements in app, was working before


Using some javascript to find an element in a login page of an app. Was working fine but made some changes and it stopped working. The changes were not related to the field and reversed the changes but still not working. Logs don’t show anything other than waiting on the element and just times out or I have to close the app to kill the session. Even though there is a timeout, sometimes it takes a long time for it to come up with the error about unable to find the element. I have tried to reinstall Appium, reboots, tried the phone on another laptop and the same code worked there. We have three laptops we are working on and now two of them have this problem. The third is still currently working. Tried the code from the working laptop and still no go.

Fails on the I.waitForElement(; but if I attempt to access any of the other fields or buttons, can’t find them either. The app currently doesn’t have IDs so I have to use the Xpath you see below but I have tried the full Xpath and still fails.

Code using
email: {
xpath: “(.//*[contains(@class, ‘EditText’)])”,

Called from another script with…
PHlogin(email, password) {
I.fillField(, email);
I.fillField(loginPage.password, password);

Appium 1.13.0
Using uiautomator2
Connected to physical Android device

Let me know what you need to troubleshoot this. Thanks.


Rolledback code and still having issue. Added a getPageSource and found out that on the loading page of the app, it is successful at seeing the elements. I added a wait to run getPageSource when at the login page and it can’t see any of the elements. Nothing is returned. Tried on BrowserStack and had the same problem.


Found the issue, the Appium log showed using UIAutomator1, wasn’t using 2. The codeceptJS config file had the line for the 2 but it needed to be under desiredCapabilities. Moved it and everything started working. As the script got bigger it killed the version 1 of automator.

Can close the thread.