Using chromedriver with selenium/python/ubuntu

后端 未结 7 1205
野趣味
野趣味 2020-12-25 11:53

I am trying to execute some tests using chromedriver and have tried using the following methods to start chromedriver.

driver = webdriver.Chrome(\'/usr/local         


        
7条回答
  •  星月不相逢
    2020-12-25 12:40

    You need to make sure the standalone ChromeDriver binary is either in your path or available in the webdriver.chrome.driver environment variable and then try to use absolute path to that binary. Below is the code for java -

        File chromeDriver = new File("/usr/bin/chromedriver");
        System.setProperty("webdriver.chrome.driver", chromeDriver.getAbsolutePath());
        driver = new ChromeDriver();
    

提交回复
热议问题