0

I have installed java and eclipse, and downloaded the JARS and placed them in the right directory as it should be. Below is my script:

package selenium;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Test {

    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver","D:\\softwares\\Selenium\\chromedriver.exe");
        //WebDriver driver = new FirefoxDriver();
        WebDriver driver = new ChromeDriver();
        driver.get("http://stackoverflow.com/");   
    }

}

And I get the below error:

Error: Unable to initialize main class selenium.Test Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver How can I solve this error?

Thili
  • 1
  • 1
  • 2

0 Answers0