Android Espresso. How to check ErrorText in TextInputLayout

后端 未结 6 1086
迷失自我
迷失自我 2020-12-16 19:29

Basically I am trying to test that after login incorrectly I have an error showing in the email field.

The view is:



        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 19:41

    Please use setError() method of EditText Ex : EditText emailEditText;

    if(invalidLogin)
        emailEditText.setError("Error Message");
    

提交回复
热议问题