我无法使用 calabsh 在 iOS UI 上点击元素



我在 iOS 应用程序上有一个标签,我无法触摸

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

我想点击最后一个元素,基本上是这个

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>>"
    }
]

我尝试了不同的方法来单击该元素,但都给了我相同的错误

NoMethodError: undefined method `to_sym' for nil:NilClass

我尝试了以下方法

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

有什么想法或建议让我能够触摸这个标签吗?

你试过tap_mark label ("com.blabla -v505")吗? 也许我误会了。

最新更新