Android -Unable to perform any operations on the text field

“I am unable to perform any operations on the text field. Regardless of the actions I attempt, such as clicking, sending keys, or clearing the text, the text field does not respond, and there are no error messages.”

other text fields in this app are normal,I can send_keys or clear but this text field can’t do anything.No error.

I try different locator strategies to locate this text field,By Xpath and by class
and try to send_keys,adb input,key_event,clear,click

I try on a real phone and use python,Is there any wrong with my code or my device? Or something wrong with this app?

The text field is for price,only can in put number with two decimal places,I am not sure if its matter
What should I do

text_box = driver.find_element(By.XPATH, "//android.widget.EditText[@text='想卖多少钱']")
print(text_box)

text_box.send_keys("5")


If the text edit only accepts numbers then GitHub - appium/appium-uiautomator2-driver: Appium driver for Android UIAutomator2 should work. Just make sure the text edit is focused before imitating the input

1 Like

you can also try

new Actions(driver).sendKeys(text).perform();
// or as mykola suggested
driver.executeScript("mobile: type", Map.ofEntries(Map.entry("text", text)));
1 Like