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 :-
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
java.lang.NullPointerException with java-client 4.1.0 ans selenium 3.9.1
java.lang.NoSuchMethodError with java-client 6.0.0 ans selenium 3.13.0
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?
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
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.
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:
Appium java-client (6.1.0)
Appium server (1.6.2)
Selenium java-client (3.13.0)
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,
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"
In the Maven-Repository you can see the necessary version of Selenium:
https://mvnrepository.com/artifact/io.appium/java-client/7.1.0
Related
I have a Java program I compile in Java 1.8 because it has - between others - because many users only have JRE 1.8. In that program I use javax.xml.bind.* quite often to marshall and unmarshall XML. To help users run it on JRE 9-10, I also provided a shell script that calls java with the -add-modules argument. For users that have Java 11+ (and no previous Java version installed), that won't work, will it?
So I thought of bundling JAXB (or EclipseLink Moxy) with my program and still compile it with JDK8 (with Eclipse IDE). So that I runs on Java 8 and still on Java 11+. Will that work?
Thanks!
here a solution add these dependencies to your pom.xml ( if u re using) maven :
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb.api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.api.version}</version>
</dependency>
and the code will compile in both version java 8 and 11.
Thank you for your comments and answers!
I finally got it running, though it is not perfect yet. This is what I did:
downloaded Jakarta JAXB 2.3.2 here: maven
unzipped it and put the content to my project directory
in Eclipse IDE 2020-6, I edited the properties of the project (Cmd+I):
Under the topic "Java Build Path", I added 3 jars with "Add External JAR": jaxb-impl.jar, jakarta.xml.bind-api.jar and jakarta.activation.jar
The part I obviously forgot before: also under "order and export", I checked that 3 JARs.
To test the result, I told Eclipse IDE under "Run/Debug", register "JRE" to run my main class with JRE 12.
That worked for me.
So recently I was given a maven project I need to compile, but there seems to be some compatibility issues with wr04j and the most recent version of Java I have installed on my Mac.
Execution {redacted} of goal ro.isdc.wro4j:wro4j-maven-plugin:1.8.0:run failed: An API incompatibility was encountered while executing ro.isdc.wro4j:wro4j-maven-plugin:1.8.0:run: java.lang.ExceptionInInitializerError: null
Upon further research I found a Java version manager similar to nvm with node. I followed all of the steps I could find to download prior versions of Java hoping to find the one that worked. One issue arrived that caskroom and homebrew don't appear to host versions of Java older than Java11.
Is there something I am missing? I run these lines in my command line
brew tap caskroom/versions
brew search java
The only versions that show up after doing this are
java
java-beta
java11
java6
All of the instructions list versions 6-11 as available. Maybe they were removed? Maybe I'm doing something wrong? Any direction would be much appreciated.
I was unable to find a version of Java before 11 on homebrew other than Java6, but found this fix for anyone receiving the same error.
<plugin> section for wr04j in the pom.xml
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.18.0</version>
</dependency>
</dependencies>
I use Intellij 2018.1 and when i add to my project a serenity-cucumber dependency with latest versions, the run and debug button doesn't work anymore. (It's strange that maven it's able to run the tests with no problem).
I tried and built the simplest project with hello world and just with that dependency. No success, same situation. When i've gone to version 1.9.8(maybe there are newer versions that could work, i will try), the intellij started to work normal.
Also tried to change project sdk and project language level.
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>1.9.35</version>
<dependency>
Now the program works with that older version, but it doesn't generate the report well. Maybe i will find a solution to run the tests with intellij with debug mode using last version.
I had written a program that counts th times i visited the site. When i press run button there opens new window with this stack trace:
I dont know what to do, beacause i am a newbie for tomcat. Im using Eclipse and tomcat 8.5. I also provide my project tree and web.xml
I hope we`ll find the answer, because i want to continue learning, and for now i stuck on this.
In this case, check the dependencies in the pom.xml file. You may be trying to use too new one for JVM or Server.
for example
JVM 1.8
Tomcat 8.5
Using jackson version 2.12.1 will cause this bug.
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.12.1</version>
</dependency>
But with version 2.9.4 there won't be a problem
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.9.4</version>
</dependency>
However, Good Practice says: Use the latest stable versions whenever possible. So maybe Upgrade server and JVM.
My application uses the Firebase Admin SDK for Java (recently upgraded from the Firebase Server SDK). It has worked correctly while testing on the local environment, however after deploying it to Google App Engine from Eclipse, the logs are showing this error:
com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backend method
java.lang.NoSuchMethodError: com.google.firebase.FirebaseOptions$Builder.setCredential(Lcom/google/firebase/auth/FirebaseCredential;)Lcom/google/firebase/FirebaseOptions$Builder;
Can anyone advise? I have checked pom.xml on the server and I can see that the firebase-admin SDK dependency was uploaded successfully:
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>5.2.0</version>
</dependency>
You may have to upgrade Firebase version to 4.1.0 or later. com.google.firebase.FirebaseOptions$Builder.setCredential() has been introduced since version 4.1.0.
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>4.1.0</version>
</dependency>
I had the same issue on Tomcat 8.0 on a dev machine (Windows 10).
I had just migrated firebase-admin from 4.1.7 version to the latest one (6.11.0), so there was somewhere an old firebase-admin-4.1.7.jar.
Hence that's what I did to fix:
find and delete any copy of firebase-admin-4.1.7.jar from my dev machine (check lib/ folders)
remove webapp from Tomcat Server
Maven Update
Project Clean