简体   繁体   English

如何使用Robotium单击回收者视图中的项目

[英]How to Click on item of recycler view using robotium

我有Robotium 5.4,但我不知道如何在android的Recycler视图中单击某个项目。

For me worked method clickInRecyclerView(int itemIndex). 对我来说,工作方法clickInRecyclerView(int itemIndex)。

From source code: 从源代码:

/** * Clicks the specified item index and returns an ArrayList of the TextView objects that / ** *单击指定的项目索引并返回TextView对象的ArrayList
* the item index is displaying. *显示项目索引。 Will use the first RecyclerView it finds. 将使用它找到的第一个RecyclerView。
* *
* @param itemIndex the item index to click * @param itemIndex要单击的项目索引
* @return an {@code ArrayList} of the {@linkTextView} objects located in the item index */ * @返回位于项目索引中的{@linkTextView}对象的{@code ArrayList} * /

public ArrayList clickInRecyclerView(int itemIndex) { public ArrayList clickInRecyclerView(int itemIndex){

Upgrade your existing Robotium version to 5.5.3 - the latest release. 将现有的Robotium版本升级到Robotium最新版本。 It has the feature to scroll RecyclerView . 它具有滚动RecyclerView的功能。 Visit here 拜访这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM