相关疑难解决方法(0)

Espresso - typeText无效

我正在尝试在EditText中键入一些文本:


    public void testSearch() {
          onView(withId(R.id.titleInput)).perform(typeText("Engineer"));
          onView(withId(R.id.titleInput)).check(matches(withText("Engineer")));
    }

我看到EditText正在获得焦点,但没有任何反应.没有输入文字.
我在手机和模拟器上试过这个 - 结果相同.

android android-espresso

11
推荐指数
6
解决办法
2万
查看次数

标签 统计

android ×1

android-espresso ×1