eclipse - 错误:无法找到或加载主类 CrossBrowserTesting.ChromeTesting
问题描述
我收到此错误:
错误:无法找到或加载主类 CrossBrowserTesting.ChromeTesting 原因:java.lang.ClassNotFoundException:CrossBrowserTesting.ChromeTesting
从下面的代码,你能整理出来吗?
package CrossBrowserTesting;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class ChromeTesting {
public static void main(String[] args) {
WebDriver driver;
System.setProperty("webdriver.chrome.driver","\\selenium webdrivers\\chromedriver.exe");
driver = new ChromeDriver();
driver.get("https://www.google.com");
driver.quit();
}
}