Android espresso:click()不显示相关页面

时间:2018-06-26 21:09:37

标签: android-espresso

我正在其中一个链接上执行click()操作;最终应该在模拟器中加载相关页面。 click()动作似乎无法启动相关页面。由于接下来的几次验证失败。

这是我的代码:

public void testHelpScreen() {
    onView(withContentDescription("Show menu")).perform(click());

     // When user taps on 'Help' option.
    onView(withText("Help")).perform(click()); //This part is not launching the related page after performing click().

    try {
      Thread.sleep(3000);
    }
        catch (InterruptedException e) {

    }
      onView(withText("TEST")).check(matches(isDisplayed()));
      pressBack(); }

有人可以检查和帮助吗?

谢谢!

0 个答案:

没有答案