-
-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidElementStateException on SecureTextField is not ready for a text input on iOS/XCUITest #1386
Comments
This isn't specific to the Java client. Seeing the same issue on a JavaScript project, also old regression test that has been passing fine for a long time until recently. Error:
Logs:
|
Downgrading to Appium 1.17.0 has resolved the issue for me. Can we move this issue over to the main repo? @mykola-mokhnach |
@GeorgeXCV Please attach the page source output. It could be the page has multiple elements with duplicated identifiers |
@mykola-mokhnach The iOS page that had this issue has two elements only, text input and a button. Like the OP, the regression test and actual UI hasn't changed in months. Downgrading to Appium 1.17.0 worked for me. |
Sorry, I cannot help nothing without the details. Also, you won't be able to use older Appium versions while Apple does new iOS releases. |
What details? I have never heard of page source output in the context of an iOS Application. Logs show one element is found. Downgrading is what fixed the issue, I believe its a bug with Appium. |
Having same issue:
Page Source including"mobile: source" - 20200906084105_872.txt Appium Log - appiumServeriPhone8.log |
@NirBY Try W3C actions to send text as a possible workaround. You could also replace local WDA source with appium/WebDriverAgent#379. I have disabled focus check there, so it makes sense to check if that helps. |
appium/WebDriverAgent#379 This works. I have tested with my test app and I am able to type to StaticTextField which was working fine with 1.17.1 and stopped when updated to 1.18.1 @mykola-mokhnach - Thanks for the quick fix. |
@mykola-mokhnach used WebDriverAgent 11.7 since I have xcode 11.7 (I have just replaced all files in /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent). Note:
|
Thank you @mykola-mokhnach. W3C actions worked for me. while waiting for the release of the new WebDriverAgent. |
Description
Just recently unable to enter text into a XCUIElementTypeSecureTextField on iOS as I consistently get
InvalidElementStateException: Error Domain=com.facebook.WebDriverAgent Code=1 "'"passwordTextField" SecureTextField' is not ready for a text input. Neither the accessibility element itself nor its accessible descendants have the input focus
I have already tried different identifiers such as xpath vs className, name, everything.
I have already tried setting hardware keyboard to true and/or false.
I have already tried setting different sendKeyStrategy options.
I have already tried getKeyboard() before and after interacting with the field.
This is a sudden break on very old regression tests, without changes to source test code or source app code for context.
Steps:
Environment
``
Details
Please provide more details, if necessary.
Code To Reproduce Issue [ Good To Have ]
@FindBy(name = "passwordTextField") private WebElement passwordTextField;
public void enterFirstPassword(String password){ ((IOSDriver)driver).getKeyboard(); passwordTextField.clear(); passwordTextField.sendKeys(password); ((IOSDriver)driver).hideKeyboard(HideKeyboardStrategy.PRESS_KEY,"next"); }
Exception Stacktraces
Link To Appium Logs
https://gist.github.com/alyshakt/365996aac3dd47ee38feded21c512070
The text was updated successfully, but these errors were encountered: