It works perfectly. I thank you very much.
Edit: Seemed to work but actually acts like it never found the item. I donât understand whatâs going on.
Edit again (sorry): I have corrected something that was wrong in my code and now I have the same problem as before.
I must point out that in the same test I have to do this check twice: in the first, the error should appear, in the second, not.
And it is in the second that Appium throws me the error:
FAILED: appiumTest.Login.Login
org.openqa.selenium.StaleElementReferenceException: The element âBy.id: com.example.prep:id/textinput_errorâ does not exist in DOM anymore
For documentation on this error, please visit: Understanding Common Errors | Selenium
Build info: version: â4.10.0â, revision: âc14d967899â
System info: os.name: âWindows 10â, os.arch: âamd64â, os.version: â10.0â, java.version: â17.0.6â
Driver info: io.appium.java_client.android.AndroidDriver
Command: [719e1b4b-35b7-4a2c-a5e3-8b7f1b02447a, getElementText {id=00000000-0000-0946-ffff-ffff0000007f}]
Capabilities {appium:app: C:\Users\elena\ecliâŠ, appium:appPackage: com.example.prep, appium:automationName: UIAutomator2, appium:databaseEnabled: false, appium:desired: {app: C:\Users\elena\ecliâŠ, automationName: UIAutomator2, deviceName: Pixel 6 API 33, platformName: ANDROID}, appium:deviceApiLevel: 33, appium:deviceManufacturer: Google, appium:deviceModel: sdk_gphone_x86_64, appium:deviceName: emulator-5554, appium:deviceScreenDensity: 420, appium:deviceScreenSize: 1080x2400, appium:deviceUDID: emulator-5554, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:pixelRatio: 2.625, appium:platformVersion: 13, appium:statBarHeight: 128, appium:takesScreenshot: true, appium:viewportRect: {height: 2081, left: 0, top: 128, width: 1080}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Element: [[AndroidDriver: on ANDROID (719e1b4b-35b7-4a2c-a5e3-8b7f1b02447a)] â id: com.example.prep:id:id/textinput_error]