Skip to content

Instantly share code, notes, and snippets.

@EmmanuelGuther
Created December 13, 2017 10:34
Show Gist options
  • Save EmmanuelGuther/9a6ea41892e052c7f3a5dfc7fd52ca79 to your computer and use it in GitHub Desktop.
Save EmmanuelGuther/9a6ea41892e052c7f3a5dfc7fd52ca79 to your computer and use it in GitHub Desktop.
Test your toolbar back button espresso
To not depend on the app locale, you can use the code from Matt Logan by replacing "Navigate up" with R.string.abc_action_bar_up_description:
onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
This helped me a lot because I have an app in more than 5 languages and I had to act like this.
@danilovalerio
Copy link

Thank's guy for tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment