harsh sharma harsh sharma - 1 year ago 219
Android Question

Sendkeys() not release the Element in Android App using Appium

WebElementUserAccount=driver.findElement(By.xpath("//android.widget.EditText[@content-desc='User account']"));

When I use this code it is not releasing the User account element it sends the text successfully but not came out of it
In the second element, I have to send the password but it will not come out from the first Element

When I use

WebElement UserName= driver.findElement(By.xpath("//android.widget.EditText[@content-desc='User account']"));
WebElement Password= driver.findElement(By.xpath("//android.widget.EditText[@content-desc='Password']"));

The Android keybord open before sending the text and it starts writing in the second element

Answer Source

Use driver.hideKeyboard(); after entering text in your first element. Your keyboard might be hiding next element.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download