下面这是 eclipse 执行后报的错误
FAILED CONFIGURATION: @BeforeTest setup
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: UiAutomator quit before it successfully launched) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 13.02 seconds

Appium 控制台打印的 error log 如下:

{ [Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 9b51d8f6 is not online
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))]
status: 13,
value: { message: 'unknown error: Device 9b51d8f6 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)' },
httpCode: 200 }
error: Could not pre-launch appium: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 9b51d8f6 is not online
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))

Appium server process ended


↙↙↙阅读原文可查看相关链接,并与作者交流