Selenium Chrome Browser org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start

前端 未结 2 1640
旧时难觅i
旧时难觅i 2020-12-04 03:45
public class Dem {
    public static void main(String[] args) throws InterruptedException {
    WebDriver driver;
    String url = \"https://www.google.com\";
    Sy         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 04:27

    public class Demo {
        public static void main(String[] args) {
            System.setProperty("webdriver.chrome.driver","\PATH OF THE DRIVER");
            WebDriver driver = new Chrome driver();
            String url = "https://www.google.com";
            driver.get(url);
            Thread.sleep(2000);
            driver.close();
        }
    }
    

提交回复
热议问题