If I do “PageFactory.initElements(new AppiumFieldDecorator(driver), this);” with java-client 2.2.0 it works. If I switch to java-client 3.2.0, java.lang.IllegalAccessError occurs.
Does anyone know what is going on?
Here are the logs.
java.lang.IllegalAccessError: tried to access method org.openqa.selenium.support.pagefactory.Annotations.assertValidAnnotations()V from class io.appium.java_client.pagefactory.AppiumAnnotations
at io.appium.java_client.pagefactory.AppiumAnnotations.assertValidAnnotations(AppiumAnnotations.java:222)
at io.appium.java_client.pagefactory.AppiumAnnotations.buildBy(AppiumAnnotations.java:315)
at io.appium.java_client.pagefactory.AppiumElementLocator.(AppiumElementLocator.java:109)
at io.appium.java_client.pagefactory.AppiumElementLocatorFactory.createLocator(AppiumElementLocatorFactory.java:41)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:102)
at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:112)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:104)
at com.elementum.qe.clients.android.exposure.pages.LoginPage.(LoginPage.java:29)
at com.elementum.qe.clients.android.exposure.testng.NewCreateIssueTest.beforeTest(NewCreateIssueTest.java:42)