Barista
Barista copied to clipboard
Feature Request: add clickAny<>() support similar to assertAny<>()
assertAny() is a nice feature to let us check any views that are hard to match.
Please add a similar clickAny() method that you can specify a matcher for. Or maybe clickOn() that takes a matcher instead of just an ID or String?
Use case is if a screen has a layout that has a few other layouts included, there are duplicate IDs so you need to reference the parent of the layout you want to clean on...
Hi Ken! Thanks for the suggestion :)
I remember discussing something like this some time ago. I thought there was an issue already but I can't find one.
Yes, in my opinion this would be a very nice feature. A clickOn(matcher: Matcher<View>)
would allow people to take advantage of Barista's magic even for corner cases that aren't supported by the current API.
Would you like to contribute it with a Pull Request? That would help a lot.
I can try doing a PR...should just able to copy the assertAny code for the most part :-)
How's this feature evolving? I've just faced a test that fits on this feature request! 😅
Is there a PR raised for this issue? If not, i'd like to work on this.
Hi @sharath2106, I don't think anybody is currently working on this. Feel free! :)