Senkeys not switching to next textbox on real device

Hi,
I am writing testcases in java for android app. App that I am testing has signup form, having 4 textboxes.
I have sent values to textboxes in following way

  1. List textZListPage4 = dr.findElements(By.className(“android.widget.EditText”));
    textZListPage4.get(0).sendKeys(“xyz”);
    textZListPage4.get(1).sendKeys(“lmn”);
    textZListPage4.get(3).sendKeys("[email protected]");

2.dr.findElement(By.id(“in.webtechasia.seenpick:id/xedtxtFirstName”)).sendKeys(“xyz”);
dr.findElement(By.id(“in.webtechasia.seenpick:id/xedtxtLastName”)).sendKeys(“lmn”);
dr.findElement(By.id(“in.webtechasia.seenpick:id/xedtxtEmail”)).sendKeys("[email protected]");

But in both way control is not going to next textbox. All values gets entered in 1st textbox.
This issue doesn’t exist on nexus, But appears on Spice Mi mobile and Moto E.

Can you please suggest solution.
Thanks

HI @manjiris,

Please have a try with the any one of the following ways,

  1. scroll to next text box after above text box is finished.
    (or)
  2. Hide the keyboard and then enter sendKeys to next text box (if they are not visible )

Hope this helps,

Bhaskar.

Thanks. I will try for 1st one. Because hideKeyboard not working.
driver.hideKeyboard() shows following error-
" The method hideKeyboard() is undefined for the type WebDriver".

try this please
AppiumDriver driver;

driver = new AndroidDriver<>(new URL(“http://127.0.0.1:4723/wd/hub”), caps);;

driver.findElement(By.xpath("//*[@content-desc=‘startUserRegistrationCD’]")).click();

List txtfield = driver.findElements(By.className(“android.widget.EditText”));
txtfield.get(0).sendKeys(“p”);
txtfield.get(1).sendKeys("[email protected]");
txtfield.get(2).sendKeys(“En”);
driver.hideKeyboard();
driver.findElement(By.className(“android.widget.Spinner”)).click();
try {
Thread.sleep(5000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

@manjiris,

I think you’ve initialized your driver as web driver, in that case the exception is expected as web driver don’t have any hideKeyboard() method

Try using AndoirdDriver/IOSDriver driver;