2015-10-06 64 views
0

我想測試一個混合的webView應用程序,並在iPhone 6模擬器上有輕擊方法的問題。 Touch在葫蘆黃瓜的同一個應用中可以正常工作。瓢2.0輕點問題

的Xcode:7.0.1版(7A1001)

OS:OSX 10.10.5優勝美地(14F27)

葫蘆,黃瓜(0.16.4):

irb(main):002:0> query "webView css:'.ion-navicon'" 
[ 
    [0] { 
      "center" => { 
      "X" => 348.046875, 
      "Y" => 53.90625000000001 
     }, 
      "webView" => "<UIWebView: 0x7f8761935e60; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f8761921320>>", 
      "nodeName" => "BUTTON", 
       "id" => "", 
     "textContent" => "\n\t\t\t", 
       "class" => "button button-icon button-clear ion-navicon", 
       "rect" => { 
        "x" => 348.0469, 
       "height" => 42, 
        "y" => 53.90625, 
       "width" => 35, 
       "left" => 280, 
       "top" => 25, 
      "center_y" => 53.90625, 
      "center_x" => 348.0469 
     }, 
      "nodeType" => "ELEMENT_NODE" 
    } 
] 

irb(main):004:0> touch "webView css:'.ion-navicon'" 
[ 
    [0] { 
      "center" => { 
      "X" => 348.046875, 
      "Y" => 53.90625000000001 
     }, 
      "webView" => "<UIWebView: 0x7f8761935e60; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f8761921320>>", 
      "nodeName" => "BUTTON", 
       "id" => "", 
     "textContent" => "\n\t\t\t", 
       "class" => "button button-icon button-clear ion-navicon", 
       "rect" => { 
        "x" => 348.0469, 
       "height" => 42, 
        "y" => 53.90625, 
       "width" => 35, 
       "left" => 280, 
       "top" => 25, 
      "center_y" => 53.90625, 
      "center_x" => 348.0469 
     }, 
      "nodeType" => "ELEMENT_NODE" 
    } 
] 

那偉大工程。

瓢2.0暫停一會兒,並最終吐出一個錯誤。

葫蘆(2.0.0.pre4):

irb(main):030:0> query "webView css:'.ion-navicon'" 
Getting: http://127.0.0.1:37265/map {} 
[ 
    [0] { 
      "center" => { 
      "X" => 348.046875, 
      "Y" => 53.90625000000001 
     }, 
      "webView" => "<UIWebView: 0x7f8310705f10; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f83107303e0>>", 
      "nodeName" => "BUTTON", 
       "id" => "", 
     "textContent" => "\n\t\t\t", 
       "class" => "button button-icon button-clear ion-navicon", 
       "rect" => { 
        "x" => 348.0469, 
       "height" => 42, 
        "y" => 53.90625, 
       "width" => 35, 
       "left" => 280, 
       "top" => 25, 
      "center_y" => 53.90625, 
      "center_x" => 348.0469 
     }, 
      "nodeType" => "ELEMENT_NODE" 
    } 
] 

irb(main):027:0> tap "webView css:'.ion-navicon'" 
Getting: http://127.0.0.1:37265/map {} 
Getting: http://127.0.0.1:37265/uia {} 
RuntimeError: Expected '' to be an array. 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:138:in `expect_uia_results_is_array' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:115:in `handle_uia_results' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:105:in `uia_over_http' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:43:in `uia_route' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:56:in `uia_serialize_and_call' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/gestures_mixin.rb:107:in `_tap' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/device.rb:145:in `tap' 
    from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/gestures.rb:50:in `tap' 
    from (irb):27 
    from /Users/szoradm/.rvm/rubies/ruby-2.0.0-p643/bin/irb:12:in `<main>' 

有什麼建議?

回答

-1

看起來像一個bug:

2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:138: 
in `expect_uia_results_is_array' 

服務器返回的一些意想不到的輸出。你能創造一個問題嗎?

在報告中,請注意Calabash iOS服務器版本。謝謝。

https://github.com/calabash/calabash

+0

會問題,謝謝。 – tuggles