Problem trying to start Selenium

I am using Ubuntu 12.04 and trying to start Selenium with the command

webdriver-manager start

but i keep getting

webdriver-manager start
seleniumProcess.pid: 3522
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncher : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.openqa.grid.selenium.GridLauncher. Program will exit.
Selenium Standalone has exited with code 1

I installed it by doing

sudo npm install –g protractor
webdriver-manager update

How can I fix this problem and start the Selenium server.

+4
source share
1 answer

An unsupported version error major.minor usually occurs due to the launch of a java program that is compiled in a newer version of java than a working version of java. most likely the version of selenium you are using is compiled from a newer version of java than your installed version of Java.

Please check the java version and upgrade it to the latest java version.

java.lang.UnsupportedClassVersionError: major.minor

+4

Source: https://habr.com/ru/post/1611854/


All Articles