android - Appium 无法在 UBUNTU 中运行

标签 android ubuntu appium

嗨,我正在尝试在 Ubuntu 中设置 appium,但是当我尝试运行测试时,出现以下错误。我已经安装了 android sdk 并设置了 ANDROID_HOME、TOOLS、PLATFORM_TOOLS 的路径......仍然 adb 无法好像找到了,请帮忙.................................................. ......

>

 ``MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"Chrome","p...
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium]   browserName: 'Chrome'
[Appium]   platformName: 'Android'
[Appium]   deviceName: 'sony'
[Appium]   platformVersion: '4.3'
[BaseDriver] Session created with session id: ff57a14e-8a49-4a79-8669-7ead18af9cbe
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_111
[AndroidDriver] We're going to run a Chrome-based session
[AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
[ADB] Checking whether adb is present
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
[MJSONWP] Encountered internal error running command: TypeError: Cannot read property 'forceStop' of undefined
    at AndroidDriver.deleteSession$ (lib/driver.js:354:19)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
    at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
    at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at nextTickCallbackWith0Args (node.js:419:9)
    at process._tickCallback (node.js:348:13)
[HTTP] <-- POST /wd/hub/session 500 423 ms - 182 

最佳答案

您必须运行 appium-doctor首先让它在启动测试之前验证正确的设置。

更多信息:Appium Doctor GitHub

关于android - Appium 无法在 UBUNTU 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40411944/

相关文章:

android - 列表 fragment : prevent race condition between getListView() and onDestroyView()

java - 将可见性设置为 VISIBLE 时不显示进度条

windows - 关于 Qt Shadow Build for Ubuntu 或 Win

php - FOSUserBundle 中未定义的参数

ubuntu - 将视频扩展(延长)到特定的持续时间

android - 在抽屉打开之前捕获事件?

android - 如何解决 Android 中的 NullPointerException 错误?

angularjs - Protractor 和 appium - 无法读取未定义的属性

java - 如何使用 junit 5 订购测试

ios - 尝试连接我的真实设备时出现 Appium 错误代码 253