Espresso - typeText not working

前端 未结 10 1095
名媛妹妹
名媛妹妹 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:35

    If you're using Genymotion, you may need to switch the default keyboard in Genymotion Configuration (it's an app on the emulator).

    1. Go to Apps -> Genymotion Configuration -> Keyboard -> Virtual keyboard (click "Yes" when you're prompted to reboot)

    NOTE: These changes do not persist after you close the emulator. You will need to set this every time you start the emulator.

提交回复
热议问题