1、new AppiumDriver<>(new URL(url), capabilities) 报错 java.lang.NoSuchMethodError:com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V

 创建session成功但应用报错测试无法继续,按错误提示应为指定方法不存在,由此判断应为jar包问题

经查验com.google.common.base为guava包中类

解决办法:

selenium-java-3.11 requires Guava 23.6-jre as per the pom.xml:

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>23.6-jre</version>
  <classifier></classifier>
</dependency>

2、连接真机后,执行代码时出现错误:A new session could not be created. (Original error: Could not extract PIDs from ps output. PIDS: [], Procs: ["ps: uiautomator"]

解决方案如下:修改Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js 文件

appium运行报错

 3、 It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible

解决办法:

1、win10上带了管理员功能,普通权限对访问操作权限不够会导致读写失败

2、以管理员的形式启动 Appium 应用并启动服务,再次执行自动遍历即可成功

4、appium运行一直在重试运行adb.exe

1、查看adb devices
    adb unauthorized
显示设备未授权

解决办法:https://blog.csdn.net/qq_32157729/article/details/88743881

 

 

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-09-12
  • 2022-02-15
  • 2021-12-13
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-04-12
相关资源
相似解决方案