0

I'm trying to create an Appium framework and I stuck with creating of android driver. The server (Appium REST http interface listener started on 0.0.0.0:4723) has started, but on the client side, the driver creation keeps failing. below are the details.

Error: Message: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/ProtocolHandshake

setup:
Java_client: 6.0.0
Appium server: same result with both 1.7.2 and 1.8.1
Cucumber+Junit+Maven

Code:

DesiredCapabilities dc; 
dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UIAUTOMATOR2");

URL url=new URL("http://0.0.0.0:4723/wd/hub");
AppiumDriver driver=new AndroidDriver(url,dc);

Failure in before hook: AppiumController.setup()

Message: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/ProtocolHandshake
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:93)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:88)
at config.DriverCreator.setAndroidDriver(DriverCreator.java:19)
Al Imran
  • 882
  • 7
  • 29
picstand
  • 141
  • 2
  • 13

1 Answers1

0

This issue was version incompatibility. Rolled the version down to 5.0.4 and server to 1.7.2; this got rid of the error.

picstand
  • 141
  • 2
  • 13
  • Hi you don't have to roll back to appium java client version to 5.0.4. You can use following versions, and you will not get that error : Appium java client version 6.0.0-BETA5, Appium server version 1.8.0 and selenium version 3.9.1. – Suraj Jogdand Jun 01 '18 at 12:16