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>