dimanche 23 juin 2019

Clicking on Login button after entering credentials not working during run-time, gives me incorrect cred error

I am sending the correct creds to username and password text boxes on the android emulator, but while clicking on submit button, it says incorrect creds. i use the same creds manually, it accepts the credentials. Is it because i am using sendkeys? or is there some session issue happening here?

driver.findElementByXPath("//android.widget.EditText[@text='Username']").sendKeys("chris");         
Thread.sleep(3000);
MobileElement passwordField = driver.findElementByXPath("//android.widget.EditText[@text='Password']");
passwordField.click();
//entering password
passwordField.sendKeys("abc!");
Thread.sleep(5000);
//clicking on submit
driver.findElementByAccessibilityId("LOGIN ").click();

Aucun commentaire:

Enregistrer un commentaire