-
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
New Actions: tapBackspaceKey
and tapReturnKey
#1044
Conversation
Fantastic, thank you! |
Done @LeoNatan. |
Looks good to me. Let's wait for @rotemmiz review as well. |
…Key and tapReturnKey
pressBackspaceKey
and pressReturnKey
tapBackspaceKey
and tapReturnKey
@rotemmiz Any idea when you'll be able to get to this? It's a blocker for my team moving to Detox (which we'd love to do asap) |
Looks great! Let's just add a few lines of documentation in https://github.com/wix/Detox/blob/master/docs/APIRef.ActionsOnElement.md |
Amaze! |
👍 |
tapBackspaceKey
and tapReturnKey
tapBackspaceKey
and tapReturnKey
Thank you! |
Any timeframe on when this will be released? |
After a few inconsistencies with lerna 3, and some faulty release, you can now find your changes in |
This PR adds support for pressing the backspace and return keys on both iOS and Android. Although iOS support exists by using typeText and the
\b
and\n
keys, this was unclear and not cross-platform. The pressBackspaceKey and pressReturnKey methods abstract these features for both platforms.Note: I did try adding a
numberOfTimes
parameter as a shortcut for pressing the backspace or return key multiple times, however I wasn't able to figure out the simplest way for executing multiple actions:For both Android and iOS, the addition
numberOfTimes
for pressReturnKey is pretty straightforward:For pressBackspaceKey on iOS, it can be implemented the same way as return, replacing
\n
with\b
. For Android, however, I'm not sure how to invoke multiplePressKeyActions
. Either way, I think this can be added in a follow up PR if it's determined to be useful.cc @LeoNatan