I have the code below in my appium script:
public boolean isErrorDisplayedUnrecognisedLoginCredentials() { return appDriver.isElementExist(By.xpath("//UIAStaticText[@name='We don't recognize this user ID or password']")); }
The test hangs because it treats the apostrophe in "not" as the last apostrophe to close the @name value. I tried to escape the apostrophe in "not" using \ ', \', & ap;
However, none of them work, and the tests continue to work. Does anyone know how to get around this?
source share