Skip to content

Appium 8.0.0 can not access selenium support package #1700

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

Closed
Jakwado opened this issue May 31, 2022 · 8 comments
Closed

Appium 8.0.0 can not access selenium support package #1700

Jakwado opened this issue May 31, 2022 · 8 comments

Comments

@Jakwado
Copy link

Jakwado commented May 31, 2022

Environment

Java: 15
Appium java-client version: 8.0.0

Details

image

I cannot use selenium classes when I pull appium java-client dependency v8.0.0. On the other hand when I pull selenium support as a separate dependency in pom here's what I get:

.NoClassDefFoundError: org/openqa/
selenium/remote/AcceptedW3CCapabilityKeys

#1108

Please provide any solution. Problem has been reported before:
#1415

Code To Reproduce Issue [ Good To Have ]

<parent>
    <artifactId>XXXXX</artifactId>
    <groupId>com.xxx</groupId>
    <version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>XXX</artifactId>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.version>3.8.0</maven.compiler.version>
    <spring.version>5.3.12</spring.version>
    <appium.version>8.0.0</appium.version>
    <junit.version>5.8.1</junit.version>
    <lombok.version>1.18.22</lombok.version>
    <assertj.version>3.21.0</assertj.version>
    <awaitility.version>4.1.1</awaitility.version>
    <reportportal.logger.version>5.1.1</reportportal.logger.version>
    <reportportal.agent.version>5.1.1</reportportal.agent.version>
    <feign.version>11.8</feign.version>
</properties>

<dependencies>
    <!--APPIUM-->
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>${appium.version}</version>
    </dependency>

Exception Stacktraces

package org.openqa.selenium.support.ui does not exist

@valfirst
Copy link
Collaborator

@Jakwado you need to add explicitly selenium-support dependency: org.seleniumhq.selenium:selenium-support

@Jakwado
Copy link
Author

Jakwado commented May 31, 2022

@valfirst
As I mentioned I tried and then I get following error:

.NoClassDefFoundError: org/openqa/
selenium/remote/AcceptedW3CCapabilityKeys

It's mentioned in this thread:
#1108

@valfirst
Copy link
Collaborator

@Jakwado make sure the version of selenium-support dependency is aligned with version of Selenium supported by Appium Java client

@Jakwado
Copy link
Author

Jakwado commented May 31, 2022

This is the dependency I added explicitly:

org.seleniumhq.selenium
selenium-support
4.2.0

It aligns with java-client:8.0.0 dependencies.

@valfirst
Copy link
Collaborator

Selenium 4.2.0 is supported starting from Appium Java client 8.1.0. See #1695.

@Jakwado
Copy link
Author

Jakwado commented May 31, 2022

What's selenium compatible version then? I tried 4.0.0, 4.1.2 and even notation you guys you in pom - "[4.0, 5.0)" - none of these work. Any tips?

Factory method 'webDriver' threw exception; nested exception is java.lang.NoClassDefFoundError: org/openqa/selenium/remote/AcceptedW3CCapabilityKeys

@Jakwado
Copy link
Author

Jakwado commented May 31, 2022

Okay I went through the topic you sent in your latest message. Upgrading Appium to 8.1 helped. Thanks a lot for your help. Any ETA regarding it's presence on mvnrepository?

@valfirst
Copy link
Collaborator

It's already available: #1695 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants