2015-11-04 87 views
1

我在Appium网站上下载了示例代码。Appium处理命令时出现未知的服务器端错误

我有xcode 6.4 appium 1.4.13。

我运行simple_test.rb,这样的代码。 iOS短刀开始,并将值放入文本字​​段中。但是当点击第一个按钮时。 错误信息出来了,即使我睡了一段时间,信息仍然存在。

info: [debug] [INST] 2015-11-04 09:54:53 +0000 Debug: Got new command 7 from instruments: au.getElement('2').rect()

info: [debug] Socket data received (83 bytes) info: [debug] Socket data being routed. info: [debug] Got result from instruments: {"status":0,"value":{"origin":{"x":94,"y":122},"size":{"width":113,"height":37}}}

info: [debug] [INST] 2015-11-04 09:54:53 +0000 Debug: evaluating au.getElement('2').rect() 2015-11-04 09:54:53 +0000 Debug: evaluation finished 2015-11-04 09:54:53 +0000 Debug: responding with: 2015-11-04 09:54:53 +0000 Debug: Running system command #8: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":{"origin":{"x":94,"y":122},"size":{"width":113,"height":37}}}... info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. (Original error: connect ECONNREFUSED)","code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","origValue":"connect ECONNREFUSED"},"sessionId":"e7e398a0-e68d-4b71-8a74-1eef7fd6e948"} info: <-- POST /wd/hub/session/e7e398a0-e68d-4b71-8a74-1eef7fd6e948/element/2/click 500 138.558 ms - 293

......

启动驱动程序

Appium :: Driver.new(desired_caps).start_driver

模块计算器 模块IOS #添加所有Appium库方法测试,使 #调用它们看起来更好。 Appium.promote_singleton_appium_methods计算器

# Add two numbers 
values  = [rand(10), rand(10)] 
expected_sum = values.reduce(&:+) 

# Find every textfield. 
elements  = textfields 

elements.each_with_index do |element, index| 
    element.type values[index] 
end 

# wait { text 'Computer Sum' } 
sleep(30) 
button(1).click 
+0

您是否检查appium服务器是否正在运行? –

回答

0
  1. 通过命令安装IOS-WebKit的调试代理: 冲泡安装IOS-WebKit的调试代理

  2. 运行IOS-WebKit的调试代理上终奌站。

  3. ios-webkit-debug-proxy要求打开“网络检查器”以允许与iOS设备建立连接。打开它进入设置> safari>高级> web检查器 - 打开。现在试试。

相关问题