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(loginPage.email); 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.waitForElement(loginPage.email);
I.fillField(loginPage.email, email);
I.fillField(loginPage.password, password);
I.tap(loginPage.loginButton);
I.waitForInvisible(commonObjects.progressBar);
},
Appium 1.13.0
Using uiautomator2
Connected to physical Android device
Let me know what you need to troubleshoot this. Thanks.