Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我能';t使用calabsh在iOS ui上点击元素_Ios_Label_Calabash_Calabash Ios - Fatal编程技术网

我能';t使用calabsh在iOS ui上点击元素

我能';t使用calabsh在iOS ui上点击元素,ios,label,calabash,calabash-ios,Ios,Label,Calabash,Calabash Ios,我在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] {

我在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>>"
    }
]
我尝试了以下方法

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

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

你有没有尝试过
点击标记标签(“com.blabla-v505”)
?可能是我误解了。

不,我现在尝试了,但没有按照您的建议进行操作,出现了不同的错误。touch找不到视图:“视图标记:”[]”,args:{:query=>“视图标记:”[]”运行
query(“标签”)
,看看它能给您带来什么。
. touch("view {accessibilityLabel LIKE 'com.blabla*'}")
. tap_mark label("label")[2]