【发布时间】:2021-07-05 07:26:08
【问题描述】:
我在运行 Appium 测试时遇到此异常。 PageFactory 的测试失败,但有以下例外。
My POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0`
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.telepathy.test</groupId>
<artifactId>twitter</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.2.0</version>
</dependency>
</dependencies>
</project>
- 直到昨天,这一切正常,我的机器重新启动,然后开始出现此错误。
- 已尝试使用最新版本的 Appium (7.5.1)
- 是否 mvn clean and refresh, update
在这里失败: PageFactory.initElements(new AppiumFieldDecorator(this.driver), this);
java.lang.RuntimeException: java.lang.NoSuchMethodException:
jdk.proxy2.$Proxy9.proxyClassLookup()
at io.appium.java_client.pagefactory.bys.builder.AppiumByBuilder.prepareAnnotationMethods(
ApiumByBuilder.java:84)
【问题讨论】:
标签: automation appium pom.xml appium-android page-factory