When I try to run my appium scripts on the pom file ( with mvn verify or mvn test)
I get a
java.lang.RuntimeException: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy12.proxyClassLookup()
On the line that instantiates my locators:
PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(15)), this);
When I run the test directly from InteliJ or run the testng.xml file, the test succeeds
- Full pom.xml: https://pastebin.com/V0FbehMh
- Full error stacktrace: https://pastebin.com/11TvTq7a
- testng.xml: https://pastebin.com/8XZtCfRt
- Related classes: https://pastebin.com/ynFizC9T
What can be the problem, when everything is fine running from test class / testng.xml, but suddenly failing when running with maven in command line