Calabash ios 具有 each_cell 方法来对表格的每个单元格执行操作。
each_cell(:query => "tableView", :animate => false, :post_scroll => 0.1) do |row, sec|
touch("tableViewCell indexPath:#{row},#{sec}")
tap "back_button"
end
我有一个集合视图,然后我尝试使用相同的代码
each_cell(:query => "collectionView", :animate => false, :post_scroll => 0.1) do |row, sec|
touch("collectionViewCell indexPath:#{row},#{sec}")
tap "back_button"
end
但它不起作用并出现此错误:
NoMethodError:“ * ”的未定义方法“次”:字符串
所以我认为这个功能可能仅限于满足表格视图?关于如何对集合视图上的每个单元格执行操作的任何想法?谢谢!