Issue java.lang.NoClassDefFoundError: org/openqa/selenium/remote/HTML5/RemoteLocationContext

Appium java test execution was working fine on mobile till one day back. But now getting issues that driver is not getting created getting error in line

Driver= new AndroidDriver(new URL(appiumServerURL),options);

The error is: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/HTML5/RemoteLocationContext

The dependency set under pom.xml is: testng version is 7.10.2, Java-client is 9.4.0, Selenium-java is 4.33.0, Selenium-api is 4.33.0

How to resolve it?

updating to Appium java-client 10.0.0 and Selenium client 4.35.0 worked for me.

Compatibility matrix is here

Hi members,

Its always advised to update the POM.xml , with compatible dependencies as quoted for appium java client

here is what worked for me,

the error is due to incompatibility issue with the version and absence of html5 in your maven dependencies especially selenium-remote-driver version should be 4.34 for appium java client 9.5.0

FYI selenium-remote-driver jar is where the html5 will be located.

my pom.xml :

appium java-client – 9.5.0

selenium-api , selenium-support,selenium-remote-driver ,selenium-java—> version 4.34