Last active
January 29, 2019 11:17
-
-
Save iRYO400/289b1232521305e9c89042123d437063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spinner. Click->Select->Check | |
YourObject expectedText = YourObject.PIECE; // for example, if it's ENUM | |
onData(allOf(is(instanceOf(YourObject.class)), is(expectedText))).perform(click()); | |
onView(withId(R.id.spinner)).check(matches(withSpinnerText(containsString(expectedText.name())))); | |
// Spinner. Click on Spinner by id-> then Select exact what you need by specifying expectedText | |
onView(withId(R.id.spinner)) | |
.perform(click()); | |
Measure expectedText = Measure.PIECE; | |
onData(allOf(is(instanceOf(Measure.class)), is(expectedText))).perform(click()); | |
// AutoCompleteTextView with suggestions, e.g. Spinner | |
// Click on AutoCompleteTextView, it will show a list of suggestions | |
onView(withId(R.id.supplier)) | |
.perform(click()); | |
// Then click on item by position | |
onData(anything()) | |
.inRoot(RootMatchers.isPlatformPopup()) | |
.atPosition(0) | |
.perform(click()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment