问题
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