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

安装成功;

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-01 09:26:01       91 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-01 09:26:01       97 阅读
  3. 在Django里面运行非项目文件

    2024-01-01 09:26:01       78 阅读
  4. Python语言-面向对象

    2024-01-01 09:26:01       88 阅读

热门阅读

  1. 元旦假期的第二天:干家务

    2024-01-01 09:26:01       49 阅读
  2. git常用命令详解

    2024-01-01 09:26:01       54 阅读
  3. Debian安装k8s记录

    2024-01-01 09:26:01       55 阅读
  4. MySQL数据表加密字段支持模糊查询的方案

    2024-01-01 09:26:01       61 阅读
  5. 云原生Kubernetes系列 | Liveness和Readiness使用

    2024-01-01 09:26:01       57 阅读
  6. Prpmetheus监控rabbitmq

    2024-01-01 09:26:01       52 阅读
  7. 139. Word Break

    2024-01-01 09:26:01       87 阅读
  8. Hive自定义函数详解

    2024-01-01 09:26:01       65 阅读
  9. Ubuntu 常用命令之 locate 命令用法介绍

    2024-01-01 09:26:01       63 阅读