Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How goBack screen in test with detox

I make automatization react native test with detox, It has the next screen sequence A -> B -> C and i wish to go back to the screen B <- C. Is there a solution for this?

like image 494
Gaston Diaz Avatar asked Jul 12 '18 15:07

Gaston Diaz


People also ask

What is detox software?

Detox is a Javascript-based end-to-end automation testing framework for mobile apps originally developed by Wix, one of the top contributors from React Native community. I was using Detox to write E2E automation tests for mobile apps both on Android and iOS.


1 Answers

There's a testId on the back button, so you can do this:

  await element(by.id("header-back")).tap();
like image 175
mikelovesrobots Avatar answered Sep 27 '22 17:09

mikelovesrobots