【发布时间】:2020-03-02 13:34:25
【问题描述】:
我有一个测试,其中有一个 Alertdialog,其中有一个“输入”字段和按钮“取消”(id 是 button2)和“Ok”(id 是 button1)。首先,我必须在字段中输入值“1234”,然后单击“确定”按钮。但它对我不起作用,测试失败。
onView(withId(R.id.input)).perform(typeText("1234"));
closeSoftKeyboard();
click(R.id.button1);
Thread.sleep(5000);
【问题讨论】:
标签: testing android-espresso barista