Closed yapkolotilov closed 4 years ago
Hi! Actually, it's not a bug, it's a design flaw :) But your solution looks like an interesting hack. What will happen if I, let's say change the screen, so the views will change, but I will reuse this matcher? Anyway, you're more than welcome to submit a PR 👍
What will happen if I, let's say change the screen, so the views will change, but I will reuse this matcher?
Espresso scans view tree on each interaction, so, if we change screen, it will keep working but with some views from previous Activity/Fragment remembered. If there is another matching view on the other screen, then 'seen' set will be cleared. We're testing app with multiple fragments and similar views, and we haven't met any problems with this implementation yet.
@yapkolotilov TY for the contribution mate!
Hi, guys!
We found issue in your framework that IndexMatcher can't be used more than once. We use this reusable version in our company. Check it out and maybe put it in your library.
With best regards,
Yaroslav.