0

I have a label on iOS app that I'm not able to touch

irb(main):022:0> label "label"
[
    [0] "Create account",
    [1] "Log in",
    [2] "com.blabla - v505"
]

I want to click the last element that basically is this

irb(main):014:0> query("view {accessibilityLabel LIKE 'com.blabla*'}")
[
    [0] {
              "class" => "UILabel",
                 "id" => nil,
               "rect" => {
            "center_x" => 160,
                   "y" => 519,
               "width" => 280,
                   "x" => 20,
            "center_y" => 540.5,
              "height" => 43
        },
              "frame" => {
                 "y" => 519,
             "width" => 280,
                 "x" => 20,
            "height" => 43
        },
              "label" => "com.blabla - v505",
        "description" => "<UILabel: 0x7a1ebac0; frame = (20 519; 280 43); text = 'com.blabla.enterprise.cal....'; clipsToBounds = YES; opaque = NO; autoresize = W+TM; gestureRecognizers = <NSArray: 0x7a1e8900>; layer = <_UILabelLayer: 0x7a1ebbe0>>"
    }
]

I tried different ways to click that element but all give me the same error

NoMethodError: undefined method `to_sym' for nil:NilClass

I tried the following

. touch("view {accessibilityLabel LIKE 'com.blabla*'}")
. tap_mark label("label")[2]

any idea or suggestion for me to be able to touch that label?

alannichols
  • 1,496
  • 1
  • 10
  • 20
fege
  • 547
  • 3
  • 7
  • 19

1 Answers1

0

Have you tried tap_mark label ("com.blabla -v505")? Maybe I'm misunderstanding.

king_wayne
  • 222
  • 1
  • 9
  • no, I tried now and doesn't work what you are suggesting, with a different error touch could not find view: 'view marked:'[]'', args: {:query=>"view marked:'[]'"} – fege Apr 24 '15 at 15:42
  • Run `query ("label")` and see what it gives you. – king_wayne Apr 24 '15 at 16:41