Using Espresso to click view inside RecyclerView item
You can do it with customize view action.
public class MyViewAction {
public static ViewAction clickChildViewWithId(final int id) {
return new ViewAction() {
@Override
public Matcher<View> getConstraints() {
return null;
}
@Override
public String getDescription() {
return "Click on a child view with specified id.";
}
@Override
public void perform(UiController uiController, View view) {
View v = view.findViewById(id);
v.performClick();
}
};
}
}
Then you can click it with
onView(withId(R.id.rv_conference_list)).perform(
RecyclerViewActions.actionOnItemAtPosition(0, MyViewAction.clickChildViewWithId(R.id. bt_deliver)));
How to click on a button within a recycler view item using espresso?
Have a look at the following stackoverflow question:
It creates a ViewAction that clicks a view object, identified by id, at a specific position in the recyclerView.
Using Espresso to click view inside RecyclerView item
Related Topics
Using Google Places API in Android
Android - How to Set Background Color of All Screens
How to Change Option Menu Icon in The Action Bar
Impossible to Rotate The Emulator with Android 4.4
Conversion from String to JSON Object Android
Items Inside Gridview Getting Repeated When Screen Scrolls
Not Able to Debug App in Android Studio
Android Listview with Checkbox Problem
Uninstall App Silently with System Privileges
Android Studio Where Is Gradle.Properties File
Trying to Port Apache Poi to Android
Android - Reduce Image File Size
Android Serversocket Programming with Jcifs Streaming Files
Gradle Warning: Variant.Getoutputfile() and Variant.Setoutputfile() Are Deprecated
How to Get Spinner Selected Item Value to String
User Does Not Have Permission to Access This Object . Firebase Storage Android
Firebase Console: How to Specify Click_Action for Notifications