Is there any way with Calabash to Query ALL objects in a screen? (really all)

倾然丶 夕夏残阳落幕 提交于 2019-12-12 04:28:10

问题


With Calabash, the Query("all *") gets about twice as much data as the query("*") alone does, but I still have data I cannot read without complex scroll logic.

Is there any good way to get a true 'All' data from a screen without scrolling?

For example, I have a screen with 12 containers each with 5-10 distinct pieces of data. I need to be able to read my containers to validate the data on the page.


回答1:


query returns all visible views.

query("all *") disables the visibility heuristics and returns all views.

Even when using all, some part of the view rect must exist within the bounds of the screen.

without scrolling

If you are using Calabash iOS, you can try the scroll_to_* methods which are documented here:

  • http://calabashapi.xamarin.com/ios/Calabash/Cucumber/Core.html

scroll_to_mark is the most generic - I recommend starting with that method.



来源:https://stackoverflow.com/questions/40616058/is-there-any-way-with-calabash-to-query-all-objects-in-a-screen-really-all

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!