【发布时间】:2018-01-12 00:38:18
【问题描述】:
我将 Selenium 与 Python Chrome 网络驱动程序一起使用。 在我使用的代码中:
driver = webdriver.Chrome(executable_path = PATH_TO_WEBDRIVER)
将 webdriver 指向 webdriver 可执行文件。有没有办法将 webdriver 指向 Chrome 浏览器二进制文件?
在https://sites.google.com/a/chromium.org/chromedriver/capabilities 他们有以下内容(我认为这是我正在寻找的):
ChromeOptions options = new ChromeOptions();
options.setBinary("/path/to/other/chrome/binary");
谁有 Python 的例子?
【问题讨论】:
标签: python linux google-chrome selenium selenium-webdriver