【问题标题】:How to click on a button within a recycler view item using espresso?如何使用浓缩咖啡点击回收站视图项目中的按钮?
【发布时间】:2015-10-25 08:48:39
【问题描述】:

举个例子,说我的回收站视图(id为“list”)就是这个Gmail收件箱

我已经知道onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(1, click()); 让我打开第二封电子邮件。

但是我如何在第二封电子邮件的星号按钮上点击 espresso ?

【问题讨论】:

    标签: android automated-tests android-recyclerview android-espresso


    【解决方案1】:

    看看下面的 stackoverflow 问题: 它创建了一个 ViewAction,它在 recyclerView 中的特定位置单击由 id 标识的视图对象。

    Using Espresso to click view inside RecyclerView item

    【讨论】:

    • 链接失效了怎么办?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多