java.lang.NoClassDefFoundError
is observed when the JRE can’t find a Class.
In simple words the required imports
or jar
files are not available. From the snapshot you have shared its pretty much evident that you have tried to add the Java Client related jars.
In this case you need to follow the following steps:
- Remove all the jars referring to previous versions of Selenium standalone server & Selenium Java client
- Import only the selenium-server-standalone-3.7.0.
- In your IDE within Project menu, select the option Build Automatically and execute the
Clean
option for all of your Projects. - Execute your Test.