how to interact with detox running in a react native app
how to interact with detox running in a react native app
My current workflow when writing tests w/ detox is roughly following:
atIndex
As you can tell, the workflow is not ideal because I'm basically guessing what the test code should look like. Instead, I'd like to be able to "connect to detox" that runs inside the app and send the commands to it. That would allow me to figure out the correct commands and then just place them into the test and would avoid the "repeat" step I mentioned above.
More specifically, I'd like to be able to set something like a breakpoint in a detox test and when I hit it, I'd like to be able to execute actions like await element(by.text('Done')).tap();
.
await element(by.text('Done')).tap();
Or alternatively, I'd like to build the app with detox build
, then manually get to a certain screen in the app and then again "connect to detox" and start executing the actions.
detox build
Is this now possible? If not, is that something that can be done?
Do I understand it correctly that the js code written in detox tests doing the interactions and assertions runs on the device itself (and not on the computer)?
The docs unfortunately don't give a lot of info about this. Thanks!
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment