<TextView
android:id="@+id/manifestName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:text="Balmoral"
android:textColor="@color/colorPrimary"
android:textSize="16sp"
android:visibility="visible" />
<RadioButton
android:id="@+id/radioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp" />
Как управлять совпадением идентификатора текстового просмотра и идентификатора радиокнопки для выбора радиокнопки в автоматизации Espresso UI.
ViewInteraction appCompatRadioButton = onView(
allOf(withId(R.id.radioButton),
childAtPosition(
childAtPosition(
withId(R.id.homeBottomLayout),
2),
0),
isDisplayed()));
appCompatRadioButton.perform(click());
Я пробовал использовать приведенный выше код эспрессо, но за это я получил ошибку:
android.support.test.espresso.AmbiguousViewMatcherException:
Problem views are marked with '****MATCHES****' below.