我的布局中有TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/email_text_input"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="0dp"
app:errorEnabled="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editTextEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/email_address"
android:inputType="textWebEmailAddress"
android:text=""
android:textColor="@color/white" />
</com.google.android.material.textfield.TextInputLayout>
我将错误设置为email_text_input
email_text_input.error = getString(R.string.please_enter_a_valid_email)
如何检查UiAutomated测试中是否显示错误?