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])

@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);

1 Like