我在 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]
有什么想法或建议让我能够触摸该标签?