-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
RemoteWebElement class shows error in compile time. But all the java-client libs downloaded. #2058
Comments
public LoginPage(AndroidDriver driver) {
My code |
The error means Selenium dependencies are missed in the classpath |
@valfirst below is the complete issue i'm facing. 26-Oct-2023 18:32:13.548 SEVERE [http-9090-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet WebdriverApi threw exception |
The issue happens in AppiumFieldDecorator initiate elements in page factory. public LoginPage(AndroidDriver driver) { The above code works when i change the PageFactory.initElements(new AppiumFieldDecorator(driver), this); to PageFactory.initElements((driver), this);. But when i remove AppiumFieldDecorator, @AndroidFindby doesnt work. |
Environment used : |
@varun2810 check your pom file for jdk |
I can confirm the same issue on my side using Java-Client-8.6.0 in an Eclipse environment with jdk17. Any update on this issue or a possible workaround, which allows the further use of AndroidFindby? |
Facing same issue. Platform: Mac |
@ranjanashish00 @uck82 @varun2810 please migrate to Appium Java client |
@valfirst So according to the matrix: https://github.com/appium/java-client?tab=readme-ov-file#compatibility-matrix
Then I have updated
Then I have added below dependencyManagement, in-order to exclude Selenium from Appium
Still facing the issue: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/RemoteWebElement Then I have updated:
|
why is it needed? actually this is the reason of your problem |
I saw the Maven dependency that
were already included in latest Appium, So though of excluding them. Nevertheless, I have removed dependencyManagement. So now the update looks like:
Still facing the issue: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/RemoteWebElement |
@ranjanashish00 please share your full POM |
Here it is: https://gist.github.com/AshishHypr/820d7aade48e05d74dbdac4001958818 Thank you. |
@ranjanashish00 the pom you shared contains:
it's not
At the same time it also has:
and set of other dependencies like I recommend to sanitize your classpath (after that the issue will gone). |
True, the pom which I shared is the complete pom file which I am using. I have removed Regarding I have updated gist too. One more thing I have observed:
And this triggers the error:
|
@valfirst Any suggestion here? |
@ranjanashish00 please try new version of Appium Java client |
@valfirst I have updated appium java client to 9.1.0 and now seeing:
|
I have same issue, does someone have any solution? |
@ranjanashish00 @truyenaspire please provide steps to reproduce |
@valfirst I have researched, the issue related to the compatibility of Selenium and Appium. I tried many version of them but issue still happens. |
Facing the same issue when selenium client > 4.14.1 and java client > 9.0, Java version is required to > 11. No issue when using selenium client = 4.13.0, Java client = 8.3.0 and Java version = 1.8 there should be some compatibility issues with new version of selenium, java client and Java. |
Facing the same issue with: Platform: macOS Sonoma(Version 14.4)
|
Hi Team, @AndroidFindBy(id = "login") Exception throwing: JDK: 21.0.1 Note: whereas tried with all listed versions of JAVA-CLIENT and SELENIUM JAVA in maven repository Whether issues are on PageFactory/annotations/versions on pom.xml, please give us some inputs to overcome this issue! Thanks in Advance Team! |
java.lang.ClassNotFoundException: org.openqa.selenium.remote.RemoteWebElement
at net.bytebuddy.dynamic.loading.ByteArrayClassLoader.findClass(ByteArrayClassLoader.java:404)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at net.bytebuddy.dynamic.loading.ByteArrayClassLoader.access$300(ByteArrayClassLoader.java:57)
at net.bytebuddy.dynamic.loading.ByteArrayClassLoader$ClassDefinitionAction.run(ByteArrayClassLoader.java:687)
at net.by
The text was updated successfully, but these errors were encountered: