要使用ChromeBrowser测试Selenium 3,我们需要一个名为ChromeDriver的额外应用.
我从GitHub找到了这个文本:
ChromeDriver仅与Chrome版本12.0.712.0或更高版本兼容.如果您需要测试较旧版本的Chrome,请使用Selenium RC和Selenium支持的WebDriver实例.
我的问题是所有ChromeDriver版本都兼容所有Chrome版本吗?每个版本之间没有冲突吗?
在哪里可以找到ChromeDriver和ChromeBrowser之间匹配的所有版本的文档?
我想在我的服务器上使用selenium构建我的爬虫.
因此我在我的Ubuntu17.10服务器上安装/下载了所需的依赖项 - 例如chromedriver,chromium-browser等
但是,当我运行以下代码时:
driver = webdriver.Chrome()
Run Code Online (Sandbox Code Playgroud)
它返回以下错误:
---------------------------------------------------------------------------
WebDriverException Traceback (most recent call last)
<ipython-input-14-2cdab8938403> in <module>()
----> 1 driver = webdriver.Chrome()
/home/zachary/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options)
66 service_args=service_args,
67 log_path=service_log_path)
---> 68 self.service.start()
69
70 try:
/home/zachary/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py in start(self)
96 count = 0
97 while True:
---> 98 self.assert_process_still_running()
99 if self.is_connectable():
100 break
/home/zachary/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py in assert_process_still_running(self)
109 raise WebDriverException(
110 'Service %s unexpectedly exited. Status code was: %s'
--> 111 % …Run Code Online (Sandbox Code Playgroud) python selenium google-chrome selenium-chromedriver selenium-webdriver