6

Can any one please tell me how do I make sure which appium java-client jar version is compatible with which selenium jar version. I have tried a lot of different appium java-client versions and also selenium versions and I faced below issues :-

  1. org.openqa.selenium.remote.RemoteWebElement cannot be cast to io.appium.java_client.android.AndroidElement with java-client 4.1.2 ans selenium 3.9.1
  2. java.lang.NullPointerException with java-client 4.1.0 ans selenium 3.9.1
  3. java.lang.NoSuchMethodError with java-client 6.0.0 ans selenium 3.13.0
  4. java.lang.NoClassDefFoundError with java-client 6.0.0 ans selenium 3.9.1

The list is long.

I have tried a lot of thing and finally it worked for me with Java-client 2.1.0 and selenium version 2.45.0

These are old version and I want to work with newer once. Is there a way to find out which java-client version works perfectly with which selenium version ?

Is there any link where there is a list of it or something instead of try all permutation and combination?

Al Imran
  • 882
  • 7
  • 29
Pankaj Devrani
  • 510
  • 1
  • 10
  • 28

5 Answers5

3

You can follow the Appium news section to get updates about the concerned dependency for selenium - java.

Example: To know about the Java - Client 5.0.2 release and to know about it's dependency visit the below link

Java-client-5-0-2

You will find the update like this

Release update and changes

Ashok kumar Ganesan
  • 1,098
  • 5
  • 20
  • 48
0

Hi You can use the following versions :

<dependencies>
        <!-- https://mvnrepository.com/artifact/io.appium/java-client -->
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>6.0.0-BETA5</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>3.9.1</version>
        </dependency>
</dependencies>

Even I had faced such issues, after few permutations the above versions work fine for me.

Suraj Jogdand
  • 308
  • 2
  • 17
0

My guess for this is that You might be having issues with environment. If is not too much inconvenient for You, use latest drivers for both Selenium and Appium.

I wrote in Your previous question You can use for eg. this environment:

if You still have issues try with this appium tool, appium-doctor.

Use appium-doctor to verify setting

After installation, we can run appium-doctor to verify settings:

appium-doctor

The green check mark of all settings indicate us that we can start next chapter - execute the existing appium demos from its source.

You can also use the appium-doctor in the appium GUI tool to verify sesstings.

if You don't have it installed:

npm install appium-doctor -g

and then following commands to check your settings

(android)

appium-doctor -- android

(ios)

appium-doctor --ios

Hope this helps,

Kovacic
  • 1,473
  • 6
  • 21
  • I tried with java client 6.1.0 and selenium 3.13.0 and appium server 1.7.1 but it didn't work for me, it gave java.lang.NoSuchMethodError: org.openqa.selenium.json.JsonOutput.write(Ljava/lang/Object;)Lorg/openqa/selenium/json/JsonOutput; error. The server version is not an issue, its just the version matching between java-client and selenium. – Pankaj Devrani Jul 19 '18 at 07:36
  • But this error I don't see to have relations with version, they are compatible for sure, something else seems to be bothering You. Version are compatible. Start by debug step-by-step and try to pinpoint the problem – Kovacic Jul 19 '18 at 07:39
0

I got it working with

    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>3.1.0</version>
    </dependency>

Before that Selenium Server was complaining about one Desired Capability: waitForQuiescence. When I run the same tests against my local there was no problem with "waitForQuiscene"

bulgar
  • 1
  • 2
  • This does not answer my question, besides it is already answered below. Although the solution you gave is quite good if you already know the version compatibility. – Pankaj Devrani Jun 20 '19 at 09:55
0

In the Maven-Repository you can see the necessary version of Selenium:

https://mvnrepository.com/artifact/io.appium/java-client/7.1.0

Joe Stoner
  • 125
  • 2
  • 13