Appium无法启动新会话

时间:2018-09-26 13:11:39

标签: java android appium appium-android appium-desktop

我是Appium的新手。我想在Mobile的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”

在控制台日志中显示为g

[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] 

0 个答案:

没有答案