Recycler view Multiple match problem in Espresso

Updated 16 April 2019

Save

Multiple match problem in recycler view appear when there are multiple buttons having the same id but you are clicking on the particular button so the point is first you have to go in recycler view then at that particular position we have to perform the click.

Error:-

Solution :-

Here we have class “MyViewAction” with object “myViewAction“.

Then we using this class in code like this:-

here “my_recycler_view” is the id of recycler view and “0” is the position where we want to click that button and
button-id” is the id of the button on which we have to perform the click.

Here is the class “MyViewAction“:-

By using this technique you can easily locate to your location When there are multiple same id buttons.

In next blog, we will discuss more basics, errors with solutions of espresso scripts.

 

 

 

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


1 comments

  • Azharul Islam
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home