How to set Google Chrome in WebDriver

前端 未结 6 1918
庸人自扰
庸人自扰 2020-12-10 11:43

I am trying to set Chrome as my browser for testing with Web-Driver and set the chromedriver.exe file properly but I am still getting the following error:

or         


        
6条回答
  •  执念已碎
    2020-12-10 12:10

    It was giving Illegal Exception.

    My workaround with code:

    public void dofirst(){
        System.setProperty("webdriver.chrome.driver","D:\\Softwares\\selenium\\chromedriver_win32\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        driver.get("http://www.facebook.com");
    }
    

提交回复
热议问题