以下程序给出了错误:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class demo {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Create a new object driver for class Web driver
System.setProperty("webdriver.chrome.driver", "C:\\Roshan_Work\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://google.com");
}
}
返回的错误是:
Error: Unable to initialize main class demo
Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver