samedi 23 septembre 2017

Espresso open bar

got the same problem as a link

but when i use

@Test
public void app6_7() throws Exception {
    onView(withId(R.id.email)).perform(clearText());
    onView(withId(R.id.email)).perform(typeText(userMail));
    onView(withId(R.id.password)).perform(clearText());
    onView(withId(R.id.password)).perform(typeText(userPassword));
    onView(withId(R.id.email_sign_in_button)).perform(click());
    openActionBarOverflowOrOptionsMenu(InstrumentationRegistry.getTargetContext());
    onView(withContentDescription(R.id.drawerLayout)).perform(click());
    onView(withId(R.id.nav_logout)).perform(click());

i get this

android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: ((is displayed on the screen to the user and with content description: is "More options") or (is displayed on the screen to the user and with class name: a string ending with "OverflowMenuButton"))

is the InstrumentationRegistry and getTargetContext not correct at this point ? its my first time to espresso so maybe i overlooked something?

Aucun commentaire:

Enregistrer un commentaire