Skip to content
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

Keyboard does not show in headless mode #3983

Closed
2 tasks done
arcln opened this issue Mar 15, 2023 · 4 comments
Closed
2 tasks done

Keyboard does not show in headless mode #3983

arcln opened this issue Mar 15, 2023 · 4 comments

Comments

@arcln
Copy link

arcln commented Mar 15, 2023

What happened?

The iOS keyboard does not show when running with --headless. Same tests without --headless shows the keyboard.

The text input is actually focused, and typing into it works, but the keyboard is hidden, just like when using CMD-K in Simulator.app.

I took a screenshot to verify this. I run the tests on my computer (mac m1 monterey).

What I've tried without success :

  • Making sure hardware keyboard is disconnected before exiting Simulator.app
  • Running on a new simulator (i.e. that wasn't installed, so no config for this device exists)
  • Tweaking ~/Library/Preferences/com.apple.iphonesimulator.plist (doesn't do anything)
  • Restarting my computer (yes, really)
  • Reading and re-reading Headless hardware keyboard default not working #1393

What was the expected behaviour?

I expected the keyboard to show up when using typeText in --headless mode on iOS.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

Type text into a text input on iOS, run with --headless, take a screenshot, notice the keyboard is not there.

In what environment did this happen?

Detox version: 20.5.0
React Native version: 0.71.4
Has Fabric (React Native's new rendering system) enabled: (yes/no) no
Node version: v16.13.0
Device model: mac m1 monterey / iphone 14 pro max simulator
iOS version: 16.2
macOS version: 12.6
Xcode version: 14.2
Test-runner (select one): jest

Detox logs

Detox logs
Nothing relevant

Device logs

Device logs
Nothing relevant

More data, please!

No response

@asafkorem
Copy link
Contributor

asafkorem commented Mar 18, 2023

Hi @arcln, interesting case. I believe it's the default behaviour of the Simulator app. It's possible that the iOS keyboard is not available because the Simulator app runs without user interface (headless mode).

Making sure hardware keyboard is disconnected before exiting Simulator.app

If I understand this correctly, you tried to uncheck the "Connect Hardware Keyboard" option, right?

@arcln
Copy link
Author

arcln commented Mar 18, 2023

Yes, the "Connect Hardware Keyboard" option is not checked.
Is Detox using Simulator.app to run tests? I thought it use some lower-level API.

Are you saying this issue is not related to detox but to the iOS simulator itself?

@stale
Copy link

stale bot commented Apr 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

@stale stale bot added the 🏚 stale label Apr 25, 2023
@stale
Copy link

stale bot commented May 3, 2023

The issue has been closed for inactivity.

@stale stale bot closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants