【问题标题】:Appium An unknown server-side error occurred while processing the commandAppium 处理命令时出现未知的服务器端错误
【发布时间】:2016-02-04 19:42:14
【问题描述】:

我在 Appium 网站上下载了示例代码。

我有 xcode 6.4 appium 1.4.13。

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

信息:[调试] [INST] 2015-11-04 09:54:53 +0000 调试:得到新命令 7 来自仪器:au.getElement('2').rect()

info: [debug] Socket data received (83 bytes) info: [debug] Socket 正在路由的数据。信息:[调试]从仪器获得结果: {"status":0,"value":{"origin":{"x":94,"y":122},"size":{"width":113,"height":37}}}

信息:[调试] [安装] 2015-11-04 09:54:53 +0000 调试:评估 au.getElement('2').rect() 2015-11-04 09:54:53 +0000 调试:评估完成 2015-11-04 09:54:53 +0000 调试:响应:2015-11-04 09:54:53 +0000 调试:运行系统命令#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,{“状态”:0,“值”:{“原点”:{“x”:94,“y”:122},“尺寸”:{“宽度”:113,“高度”:37}} }... 信息:[调试] 以错误响应客户端: {"status":13,"value":{"message":"发生未知的服务器端错误 在处理命令时。 (原始错误:连接 ECONNREFUSED)","code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","origValue":"connect ECONNREFUSED"},"sessionId":"e7e398a0-e68d-4b71-8a74-1eef7fd6e948"} 信息:

......

启动驱动

Appium::Driver.new(desired_caps).start_driver

模块计算器 模块IOS # 将所有 Appium 库方法添加到 Test 中 # 称呼他们看起来更好。 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

【问题讨论】:

  • 你检查appium服务器是否正在运行?

标签: ios ruby appium


【解决方案1】:
  1. 通过命令安装 ios-webkit-debug-proxy: brew install ios-webkit-debug-proxy

  2. 在终端上运行 ios-webkit-debug-proxy。

  3. ios-webkit-debug-proxy 需要打开“网络检查器”以允许与 iOS 设备建立连接。打开它转到设置>野生动物园>高级>网络检查器-打开。立即尝试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-25
    • 2018-07-26
    • 1970-01-01
    • 2019-12-16
    • 2016-10-14
    • 2017-05-07
    • 2017-01-22
    • 2017-10-21
    相关资源
    最近更新 更多