ChromeDriver: Custom Chrome Executable Path

后端 未结 2 808
忘掉有多难
忘掉有多难 2021-01-01 05:10

I\'m using the portable version of Google Chrome.

Since WebDriver expects the default installation path, it does not find the portable one which obviously is at anot

2条回答
  •  猫巷女王i
    2021-01-01 05:56

    Python version:

    chromedriver = "/path/to/chromedriver"
    options = Options()
    options.binary_location = '/path/to/chrome'
    driver = webdriver.Chrome(chromedriver, chrome_options=options)
    

提交回复
热议问题