android - 在 Android 中使用 calabash 实现 ListView 点击自动化

标签 android calabash

我需要在 Android 应用程序上自动单击列表项。我用谷歌搜索了很多,没有找到任何有用的信息。请帮助我。提前致谢。

最佳答案

Then I press list item number 2

是 Calabash 中预定义的步骤定义。使用此步骤不是最佳实践 see here原因之一是它不是用您的业务语言编写的。

如果您只需使用相应的 Calabash 命令来编写自己的步骤,这是一个更好的方法。由于 Calabash 是开源的,您可以根据您的情况在 Github 中找到所有步骤的实现:

Then /^I press list item number (\d+)$/ do |line_index|
  performAction('press_list_item', line_index, 0)
end

来自Calabash Repo

关于android - 在 Android 中使用 calabash 实现 ListView 点击自动化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22218959/

相关文章:

ruby - 遵循 Ruby 中 "Methods return other PageObjects"的测试自动化最佳实践

android - 我可以使用 styles.xml 设置操作栏的主页图标吗?

android - 如何通过android蓝牙与obd2建立连接

android - 在销毁 View 中将 View 可见性设置为 View.GONE

ios - Calabash-ios - 如何设置位置?

calabash-android - 辞职有什么作用?

android - 为什么 LinearLayout 属性 "layout_weight"似乎与我认为它应该做的相反?

android - 视口(viewport)元标记在 Android 4.4 WebView 中被忽略

ios - 葫芦 iOS : how to get value using query command

ios - Calabash iOS - wait_for_element_exists 不起作用