New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java.lang.IllegalAccessError from PageFactory when I switch to java-client 3.2.0 #5683
Comments
Maybe you need to change as below: PageFactory.initElements(new AppiumFieldDecorator(driver, 5,TimeUnit.SECONDS), this); It works on my laptop |
Tested with java-client 3.2.0. It did not work.... Below is my partial code. Any idea? public class CommonMobileLoginPage extends PageObjectBase implements ILoginPage {
|
@mkataokaelementum please give a try in appium 1.5.1 and java-client 3.4.1.Incase of issues, please report here,https://github.com/appium/java-client/issues FYI https://github.com/appium/java-client/blob/master/docs/Page-objects.md |
@triager please close |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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)
The text was updated successfully, but these errors were encountered: