Search code examples
calabashcalabash-android

Is it possible to directly query and return 2 fields per object?


For example when querying a screen in an app, can I only return the text of an object and the center_y coordinate?

So far I've gotten just the text by using the query :

query("CalendarCellView", :text)

but can I get just the text and center_y fields returned in the results hash (without editing the hash myself)?


Solution

  • It isn't. There isn't support for multiple selectors at the moment, which would be necessary to select multiple parts of the output. There aren't even selectors for some elements at all - see the answer in this post Calabash iOS: how to get value using query command. I don't think there is a selector for center_y.

    This leaves you with a map or select as the only option.