I am setting selenium web driver. I set it up as Maven project.
My basic "Hello world" equivalent tests that are not using webdriver is class is working fine. How ever when I tried using the code breaks and I get the following error.
WebDriver driver = new FirefoxDriver();
java.lang.UnsupportedClassVersionError: org/openqa/selenium/firefox/FirefoxDriver : Unsupported major.minor version 51.0
From what I understand it is a java version issue. So, I went ahead and installed Java 1.8.
When I run java -version I get this:
java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
But still my code breaks.
My bash profile still reads java 1.6 export
PATH="/Users/pathToPerForce/p4/JavaLib/main/build/apache-ant-1.6.3/bin:/Applications/p4:${PATH}When I set up this as Maven project I could right click on project and "build as" maven build. Now that is failing too.
I am fairly new to java and selenium and not able to comprehend this is good depth. Any help in fixing this is much appreciated.