我一直在网上寻找答案,但找不到它。请帮帮我。 如何在Calabash-Android中按下列表项目?Calabash android,点击ListView?
0
A
回答
2
试试这个
将定义添加到ruby步骤文件。
Then /^I scroll to cell with "([^\"]*)" label and touch it$/ do |name|
element="TextView text:'#{name}'"
if !element_exists(element)
wait_poll(:until_exists => "TextView text:'#{name}'", :timeout => WAIT_TIMEOUT) do
performAction('scroll_down')
end
if element_exists(element)
touch(element)
sleep(STEP_PAUSE)
else
screenshot_and_raise "could not find the cell"
end
else
touch(element)
sleep(STEP_PAUSE)
end
end
,并从功能文件Then I scroll to cell with "cellMainLabel" label and touch it
+0
感谢它的运作 – Sasha
0
上面的答案看起来有点傻瓜证明比我打电话,但我一直在使用下面的相当愉快:
spinner selection
Then (/^I select spinner by id "(.*?)"$/) do |spinnerid|
touch("spinner id:'#{spinnerid}'")
end
select an item in the damn spinner
Then (/^I touch "(.*?)"$/) do |text|
touch("TextView text:'#{text}'")
end
这两个步骤,第一部分将通过它的id选择微调器,然后第二部分通过你引用的文本选择微调器中的项目。
相关问题
- 1. calabash-android:点击图片的名字
- 2. Listview点击Android
- 3. android listview item点击
- 4. Calabash Android通过ListView循环检查
- 5. 点击Android ListView的整行
- 6. ListView点击在Android片段
- 7. Android Listview点击崩溃
- 8. Android的Listview按钮点击
- 9. Android - SimpleCursorAdapter ListView无法点击
- 10. Android仪器ListView点击
- 11. Calabash Android
- 12. Calabash-Android IF ELSE
- 13. Calabash android - HTTPClient :: KeepAliveDisconnected
- 14. 的ListView点击
- 15. ListView和按钮点击小工具[Android]
- 16. Android ListView与CheckBox可以区分点击
- 17. android-在ListView中处理项目点击
- 18. Android,ListView项目变得不可点击
- 19. ListView项目点击数(Android Java)
- 20. Android Listview多个按钮点击
- 21. Android ListView无法点击项目
- 22. ListView项在Android中不可点击
- 23. 的Android - 延迟点击ListView中
- 24. android button在listview中可点击
- 25. Android ListView控件行可点击
- 26. Android listview点击多个项目
- 27. 无法点击ListView中的元素Android
- 28. c中可点击的listview android
- 29. android tab布局listview不可点击
- 30. Android ListView - 如何应对物品点击?
你是什么意思?你能提供更多细节吗?你有什么和你想做什么? – balazsbalazs