Espresso - typeText not working

前端 未结 10 1113
名媛妹妹
名媛妹妹 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条回答
  •  时光取名叫无心
    2021-02-13 22:43

    You can include it with in the code like this,

    onView(withId(R.id.titleInput))
         .perform(click(), replaceText("Engineer"), closeSoftKeyboard());
    

提交回复
热议问题