Espresso - typeText not working

前端 未结 10 1066
名媛妹妹
名媛妹妹 2021-02-13 22:20

I\'m trying to type some text inside an EditText:


    public void testSearch() {
          onView(withId(R.id.titleInput)).perform(typeText(\"Engineer\"));
          


        
10条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 22:33

    Same issue resolved with the following:

    editText.perform(scrollTo(), click(), clearText(), typeText(myInput), closeSoftKeyboard())
    

    Interestingly, I only ever had a problem when my machine was working hard.

提交回复
热议问题