-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Disable iOS simulator keyboard #4553
Comments
Hey @MetodievIvaylo, I'm surprised this didn’t work:
Did you try tapping on a specific point on the screen's container to dismiss the keyboard? If that doesn’t work, it might also affect real users. Worth trying with a small |
await element(by.id('my_input_field')).tapReturnKey() this worked for me⬆️ |
I don't have this issue with versions preceding |
After hours of trial and error figured out using A reliable way to completely disable the soft keyboard would be very helpful. |
I am using Jest and Detox for mobile automation testing on iOS simulators. However, I am encountering a recurring issue where the iOS simulator keyboard interferes with my tests, causing them to fail.
The main problem arises when the keyboard remains open after entering text into an input field, which disrupts subsequent test steps. The usual methods I’ve tried to close the keyboard include:
defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false
added as a step in CIUnfortunately, these methods are not consistently reliable. Additionally, the keyboard’s opening or closing animations sometimes cause tests to break, leading to flaky tests.
I am seeking a solution to disable the iOS simulator keyboard before running tests.
Your environment
Detox version: 20.25.5
React Native version: 0.74.1
Node version: 20.15.1
Device model:
OS: 17
Test-runner (select one): jest
The text was updated successfully, but these errors were encountered: