Created
September 5, 2019 06:02
-
-
Save rakib10rr3/8c03a9ded2ba3fa00a6000c2648bcdbb 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
class ClickCloseIconAction : ViewAction { | |
override fun getConstraints(): Matcher<View> { | |
return ViewMatchers.isAssignableFrom(Chip::class.java) | |
} | |
override fun getDescription(): String { | |
return "click drawable " | |
} | |
override fun perform(uiController: UiController, view: View) { | |
val chip = view as Chip//we matched | |
chip.performCloseIconClick() | |
} | |
} | |
//call it like this | |
onView(withId(R.id.chip)).perform(ClickCloseIconAction()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment