2

I have recently been having issues getting my Eclipse IDE to work in order to perform Java automation scripts with Selenium Webdriver.

I am learning automation testing for the first time, as I will be starting a new job within a few months as a Automation Test Engineer.

I keep getting the following errors (see below) while simply trying to run a script to open up my browser. I would really appreciate if someone could provide me with some serious help, as something is clearly wrong with my setup of Java/Selenium/Eclipse/browser drivers etc.

At one point it had been working, however I believe I may have updated something or moved files to the wrong place. Any help would be appreciated!

Thanks!

THE SIMPLE TEST SCRIPT

package dayOne;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

public class TestOne {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        System.out.println("hello world");
        
        WebDriver driver = new FirefoxDriver();
        driver.get("https://www.google.com"); }}

THE CONSOLE ERROR

hello world

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108) at dayOne.TestOne.main(TestOne.java:13) Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 2 more

this is my eclipse screen + the error i am getting

nk11
  • 21
  • 2

0 Answers0