appium安装运行报错的解决方案
appium版本2.3
java17
运行报错:
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'UiAutomator2' and platformName 'android'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Could not find installed driver to support given caps)?
原因:由于没有安装appium driver
使用下面的步骤:
?
appium driver install uiautomator2
但是出现了下面的报错:
Error: ? Encountered an error when installing package: npm command 'install --save-dev --no-progress --no-audit --prefer-offline --omit=peer --save-exact --global-style --no-package-lock appium-uiautomator2-driver --json' failed with code 1.
npm ERR! [22:01:34] Error installing Chromedriver: read ECONNRESET
npm ERR! [22:01:34] Error: read ECONNRESET
npm ERR! [22:01:34] Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
?
这个日志显示是由于需要设置APPIUM_SKIP_CHROMEDRIVER_INSTALL,但是没说怎么设置。
Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
墙了一下给出了答案:
APPIUM_SKIP_CHROMEDRIVER_INSTALL=1 appium driver install uiautomator2
安装成功;
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!