Error getting on Appium, Cannot set the element to 'value'. Did you interact with the correct element?

I am doing automation of the app using appium. I am able to lunch the app but I go for login, it can read the XPath for login. But appium is unable to enter the mobile number. For mobile device, I am using the emulator.

This is my code:


This is my Xpath:


Error facing:

Encountered internal error running command: io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to ‘value’. Did you interact with the correct element?

it might be the field has some special input validators, which prevent sendKeys method to work properly on it. Try to send the text via actions or via mobile: type (the latter is only available since v. 1.17 or in [email protected] and supports input of Unicode characters)

@mykola-mokhnach Thanks. But will explain to me how should I send the key-value via mobile. bcoz when I run the code “Unicode IME” gets enable and “Gboard” gets disable automatically. This is the reason I am unable to enter send key value in the path.


Add the below two capabilities to your code to enable the keyboard.

capabilities.setCapability(“unicodeKeyboard”, false);
capabilities.setCapability(“resetKeyboard”, false);

Send keys using action class as follows:

Actions action = new Actions(driver);


you know what. Especially to Say thanks to you only i registered my account in site. i am testing android in appium. trying send keys to textbox since three days. but failed. i did browse almost all sites like stackoverflow. nothing seems to work your suggestion works for me. really very very Thanks boss.

You are just awesome…:clap::clap::clap:

Thanks @pothurajtharun, the solution worked perfectly for me. I was aware of Actions Class but was not sure whether it would work for native codes or not. Luckily it worked, Thanks man!