Is it possible to use typeText to send keyboard events other than typing letters into forms?
Detox uses EarlGrey to interact with the UI (among other things). Take a look at these examples here, https://github.com/google/EarlGrey/issues/248
In brief, you can typeText \n or match by.label('return') and tap on the matched view.
Closed by mistake, please close if this answers your question.
That's great! Thank you.
@rotemmiz, sorry for reopen this
I just got a slight difficulty for pressing enter on a numpad keyboard. It doesn't have Enter keyboard so when I wanna press Enter, it just tell me that
GREYKeyboard: No known SHIFT key was found in the hierarchy.
Thanks for helping out.
If you have a login screen then use "\n" at the end of the field you want the keyboard to close.
e.g:
await element(by.id('UsernameTestId')).typeText('username');
await element(by.id('PasswordTestId')).typeText('password\n');
await element(by.id('LoginTestId')).tap();
Most helpful comment
Detox uses EarlGrey to interact with the UI (among other things). Take a look at these examples here, https://github.com/google/EarlGrey/issues/248
In brief, you can typeText
\nor matchby.label('return')and tap on the matched view.