Exception in thread “main” org.openqa.selenium.InvalidElementStateException: Cannot set the element to ‘abc123’. Did you interact with the correct element?
try find your element without text. as far as it changes. only by e.g. “android.widget.EditText”. if it second then use findElements and take second one.
first one does not work without open keyboard. and first way is more natural to copy user behavior. e.g. setValue works faster and does not need keyboard but very sometimes it does not work with some fields. in such case better user way with tap on input to appear keyboard and then sendKeys.
i mentioned - first tap on input. then send text. better use your:
driver.findElements(AppiumBy.className("android.widget.EditText")).get(0).sendKeys("000000016");
// or
new Actions(driver).sendKeys(text).perform();
// deprecated in old versions (you did not said what you using)
// driver.getKeyboard().sendKeys(text);
Thanks for your reply.
I have one error after first Tap & then send values its working But after next when i m sending values to next password tab its not sending. Im getting Element not found error.
Could you please let me know how can we close that taped Keyboard to process next.
Attached image for Keyborad open
Im using correct field for password … First clicking on that passowrd filed & then sending values But keyboard is already open before this.
Also tried by sending directly values because keyboard is already open but its also not working.
so could you please help me how can we close that keyboard …?