Text Verification from Popup.
I need to verify the text from popup
example
user enter the invalid username the popup with message is occurs like “Username/Password is inValid”
i need to verify this the same message is shown to the user or not how i can ??
using Appium JAVA on Android Application
public void ValidUsernameInvalidPassword(String username, String password)
{
mUsernameField.sendKeys(username);
mPasswordField.sendKeys(password);
mSignInButton.click();
String result = mDriver.findElementById("dk.dsg.and.store.controllers:id/tvMessage").getText();
System.out.println("Alert text Is -> " + result);
if ("Fejl ved logon. Forkert brugerID eller kode..".equals(result))
{
mDriver.findElementById("dk.dsg.and.store.controllers:id/btnOk").click();
}
}