0

我是 Appium 的新手。我想在移动设备上的 Chrome 浏览器中启动站点 (amazon.in),为此我下载了安装在我的 Win7 机器上的最新 appium-desktop 1.7.0。我启动了在端口 5000 上运行的 Appium 服务器,然后单击了启动检查器部分。在自动服务器选项卡下添加了所需的功能,如下所示

 {
      "udid": "c78cd64b7ce4",
      "browserName": "Browser",
      "platformVersion": "7.1.2",
      "platformName": "Android",
      "noReset": true,
      "automationName": "UiAutomator2",
      "deviceName": "Android"
    }

单击“开始会话”时,其抛出错误为“处理命令时发生未知的服务器端错误。原始错误:命令 'java -version' 以代码 2 退出”

在控制台日志中显示为

[2018-09-26 06:26:10][MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"UiAutomator2","browserName":"Browser","deviceName":"Android","noReset":false,"platformName":"Android","platformVersion":"7.1.2","udid":"c78cd64b7ce4","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[2018-09-26 06:26:10][BaseDriver] Event 'newSessionRequested' logged at 1537966570642 (18:26:10 GMT+0530 (India Standard Time))
[2018-09-26 06:26:10][Appium] Creating new AndroidUiautomator2Driver (v1.16.0) session
[2018-09-26 06:26:10][Appium] Capabilities:
[2018-09-26 06:26:10][Appium]   automationName: UiAutomator2
[2018-09-26 06:26:10][Appium]   browserName: Browser
[2018-09-26 06:26:10][Appium]   deviceName: Android
[2018-09-26 06:26:10][Appium]   noReset: false
[2018-09-26 06:26:10][Appium]   platformName: Android
[2018-09-26 06:26:10][Appium]   platformVersion: 7.1.2
[2018-09-26 06:26:10][Appium]   udid: c78cd64b7ce4
[2018-09-26 06:26:10][Appium]   newCommandTimeout: 0
[2018-09-26 06:26:10][Appium]   connectHardwareKeyboard: true
[2018-09-26 06:26:10][BaseDriver] Creating session with MJSONWP desired capabilities: {"automationName":"UiAutoma...
[2018-09-26 06:26:10][BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
[2018-09-26 06:26:10][BaseDriver] Session created with session id: 873dbb16-ddcb-4870-bfc6-1236da96772d
[2018-09-26 06:26:10][UiAutomator2] We're going to run a Chrome-based session
[2018-09-26 06:26:10][UiAutomator2] Chrome-type package and activity are com.android.browser and com.android.browser.BrowserActivity
[2018-09-26 06:26:11][UiAutomator2] Deleting UiAutomator2 session
[2018-09-26 06:26:11][BaseDriver] Event 'newSessionStarted' logged at 1537966571337 (18:26:11 GMT+0530 (India Standard Time))
[2018-09-26 06:26:11][MJSONWP] Encountered internal error running command: Error: Command 'java -version' exited with code 2
[2018-09-26 06:26:11][MJSONWP]     at ChildProcess. (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\teen_process\lib\exec.js:94:19)
[2018-09-26 06:26:11][MJSONWP]     at emitTwo (events.js:126:13)
[2018-09-26 06:26:11][MJSONWP]     at ChildProcess.emit (events.js:214:7)
[2018-09-26 06:26:11][MJSONWP]     at maybeClose (internal/child_process.js:925:16)
[2018-09-26 06:26:11][MJSONWP]     at Socket.stream.socket.on (internal/child_process.js:346:11)
[2018-09-26 06:26:11][MJSONWP]     at emitOne (events.js:116:13)
[2018-09-26 06:26:11][MJSONWP]     at Socket.emit (events.js:211:7)
[2018-09-26 06:26:11][MJSONWP]     at Pipe._handle.close [as _onclose] (net.js:554:12)
[2018-09-26 06:26:11][HTTP] <-- POST /wd/hub/session 500 700 ms - 179
[2018-09-26 06:26:11][HTTP] 
4

0 回答 0