appium v1.7.2 Technology - Java
Below Method is used -
public void setLoginPassword(String loginPswd) throws InterruptedException {
WebDriverWait wait = new WebDriverWait(driver, 50);
WebElement a = wait.until(ExpectedConditions.visibilityOf(loginPassword));
loginPassword.sendKeys(loginPswd);
}
I had similar issue with email field on Google Sign In page.
This code helped me that time (updated for appium-java-client 6.1.0):
WebElement passwordField = driver.findElement(<locator>);
TouchAction action = new TouchAction(driver);
action.longPress(LongPressOptions.longPressOptions()
.withElement(ElementOption.element(passwordField)))
.release()
.perform();
driver.getKeyboard().sendKeys(<passwordValue>);
If that won't help try to play with Android keyboard, eg solution mentioned here https://github.com/appium/java-client/issues/916#issuecomment-392558236
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.