List<MobileElement> editableFields = driver.findElementsByClassName("android.widget.EditText");
editableFields.get(0).sendKeys("person@gmail.com"); //Email field
editableFields.get(0).click();
editableFields.get(1).click(); //Password field
editableFields.get(1).sendKeys("123456");
So here’s some backstory on the app… The app requires the user to type their email then password, and will not allow the user to continue unless this specific criteria is met.
It is very picky and expects touches on both fields before moving forward otherwise there is a “please enter a valid email” message.
This is why I ask appium to kindly click each button. It looks as to me as though appium is tring to click the center of the field. After clicking the first one the blue Cursor indicator pops up, and this cursor blocks the very center of the second button. What this means is that upon clicking the center of the SECOND field, appium thinks it clicked when it actually just clicked a cursor.
The blue cursor indicator, to be more specific, is a cursor letting the phone user know where they’re about to type. You can tap it and the phone will prompt you options like “Select all” and “Paste”. These options are popping up on their own which is why I believe that this cursor is getting tapped, and not the second field.
I cannot alter anything in the app at this point in time. I would use a set focus method if it existed, so if it does please point me toward the documentation for that.
Does anyone know a possible solution for this?