def query(query, *args)
      Calabash::Internal.with_current_target {|target| target.map_route(Query.new(query), :query, *args)}
    end
def query(query, *args)
      Calabash::Internal.with_current_target {|target| target.map_route(Query.new(query), :query, *args)}
    end
Queries the view hierarchy to find all views matching `query`.
 Optionally query takes a variable number of “invocation” arguments
 (args below).
 If called with an empty list of *args, query will find the views
 specified by `query` and return a QueryResult of serialized views.

 @note If this method is called with invocation arguments, it might allow
  the author of the test to do an interaction with app that a user would
  not be able to (for example changing the text of a view).

 @example
  query("* marked:'my view'")
  query("* id:'foo' descendant UIButton")
  query("android.widget.ProgressBar")
  query("* {text CONTAINS 'something'}")
  query("* {y > 200}")

 @example
  # Find all the elements, visible as well as invisible
  query("all *")

 @example
  query("editText", :setText => 'my text')
  query("scrollView", :scrollBy => [50, 10])

 @example
  irb(main):009:0> query("UITabBarButton index:0")
  [
      [0] {
      "class" => "UITabBarButton",
      "id" => nil,
      "rect" => {
          "center_x" => 40,
          "y" => 520,
          "width" => 76,
          "x" => 2,
          "center_y" => 544,
          "height" => 48
      },
      "frame" => {
          "y" => 1,
          "width" => 76,
          "x" => 2,
          "height" => 48
      },
      "label" => "Reader",
      "description" => "<UITabBarButton: 0xdabb510; frame = (2 1; 76 48); opaque = NO; layer = <CALayer: 0xdabd8e0>>"
  }
  ]

 @note Even if the query matches only one view, the QueryResult returned
  is still a list of elements.

 @param [String, Hash, Calabash::Query] query The query to match the
  view(s)

 @param args Optional var-args list describing a chain of method
  names (selectors).

 @return [Calabash::QueryResult] A result of the query