내 레이아웃의 일부입니다사용 에스프레소 여기
<com.rey.material.widget.EditText
android:id="@+id/tagEditorSettings"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/circularProgressbar"
android:hint="@string/tag_name_tag_settings"
android:inputType="text"
android:textSize="18sp"
app:et_dividerColor="@color/my_primary"
app:et_dividerHeight="1dp"
app:et_inputId="@+id/name_input"
app:et_labelEnable="true"
app:et_labelTextSize="14sp"
app:et_supportLines="1" />
내 테스트 코드 :
onView(withId(R.id.tagEditorSettings))
.perform(click()).perform(clearText());
그리고 나는 그것을 실행하려고하면 나는 그런 오류 얻을 :
을Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints: (is displayed on the screen to the user and is assignable from class: class android.widget.EditText)
"클래스에서 할당 할 수 있습니다 : class android.widget.EditText"로 문제가 있음을 알고 있지만, 누군가가 조언을 해줄 수 있고, 어떻게 고칠 수 있습니까? 내 경우에 사용합니까?
너무 감사합니다! 당신은 많은 시간을 절약했습니다!) – JohnA
@JohnA 내가 도울 수있어서 기뻐요 –