rubyios-simulatorcalabash-ios

Calabash-ios: Trying to query for the objects id's list and get "*****" in the result


In calabash-android, the command query(“*”,:id) returns with the list of the object’s id’s content (and empty id will return: nil).

But, in calabash-ios, the same command return with list of “*****” (example below).

The entire list is like that, even that some of the id’s have content.

`irb(main):033:0> query("*",:id)
[
[ 0] "*****",
[ 1] "*****",
[ 2] "*****",
[ 3] "*****",
[ 4] "*****",
[ 5] "*****",
[ 6] "*****",
[ 7] "*****",
[ 8] "*****",`

If I run the command: query("* id:'next_arrow'") I’m getting the result below:

`[5] {
                   "alpha" => 1,
                 "enabled" => false,
                      "id" => "next_arrow",
                 "visible" => 1,
                   "frame" => {
             "y" => 0,
             "x" => 0,
         "width" => 15,
        "height" => 15
    },
    "accessibilityElement" => false,
                   "class" => "UIImageView",
                   "label" => nil,
             "description" => "<UIImageView: 0x7ffda8a6d3c0; frame = (0 0; 15 15); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x7ffda8a6c1f0>> - (null)",
                   "value" => nil,
                    "rect" => {
               "y" => 386.5,
        "center_x" => 18.16,
        "center_y" => 461.72,
               "x" => 8,
           "width" => 15,
          "height" => 15
    }
}

I expected to see the "next_arrow" in the list when I ran: query("*",:id).

There is no issue when I’m running the command query(“*”,:text)

I’m running it on iOS 9.0 simulator.

What I’m doing wrong with the query syntax?


Solution

  • You can try this:

    query("*",:accessibilityIdentifier)

    And this is the sample list I get:

    [  0] nil,
    [  1] nil,
    [  2] nil,
    [  3] nil,
    [  4] nil,
    [  5] nil,
    [  6] nil,
    [  7] "dashboard_page",
    [  8] nil,
    [  9] nil,
    [ 10] nil,
    [ 11] "home_summary_background",
    [ 12] nil,