-
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
typeText and clearText sometimes fail due to keyboard sync #39
Comments
not sure, I think it's a different problem |
Not that I can remember. @rotemmiz |
I also have this problem. I can find the element meaning await expect(element(by.id('<testID>'))).toBeVisible() works but when I try await element(by.id('testID')).typeText(<someString>) I get the above error with keyboard out of sync. |
What error exactly are you getting ? Note that your computer keyboard layout must be on qwerty english for EarlGrey to be able to type the text. |
|
This can happen if you’ve played around with CMD+H (soft keyboard) or CMD+SHIFT+H (hardware keyboard). Restore those to default and make sure that the keyboard appears on screen when making a text field a first responder. Or use |
I haven't really used the keys CMD+H or CMD+SHIFT+H in my simulations and when I use
For now I'm just using a sleep command like bellow to give me time to manually insert the string; but, this should not be a permanent solution...
|
I don't remember toggling keyboard setting as @LeoNatan mentions. However, when I check Hardware/Keyboard in my simulator, I can see that SW keyboard is turned off. It made sense to turn it on, and I could see the difference right away, when focusing on input field. Running my test case after this change, it worked as I would expect. |
The third one is greyed out and the second one doesn't seem to work. |
I have always click on the input before type text on the tests like humans, not robots. And don't see any problems. |
Thank you! That's exactly what I needed. |
Just going to chime in from detox 7.3.7, if I have I'd prefer to have this setting enabled, since I usually run through the app manually to find where the next set of e2e tests should be, which always requires me to run my app through a login step. Is this still an issue? I can toggle things for now, but it's just another step that I need to document for my dev team. |
Hey @mrozbarry, it makes it hard for us to track progress of closed issues. |
We sometimes have sync problems with the keyboard not shown yet:
2016-10-08 01:47:39.567 example[38497:4275833] Detox Test Failed: Element matcher: (respondsToSelector(accessibilityIdentifier) && accessibilityID("UniqueId005")) Complete Error: Error Domain=com.google.earlgrey.ElementInteractionErrorDomain Code=1 "Failed to type string "�����������������", because keyboard was not shown on screen." UserInfo={NSLocalizedDescription=Failed to type string "�����������������", because keyboard was not shown on screen.}
The text was updated successfully, but these errors were encountered: