在没有ChromeDriver的情况下使用硒

时间:2020-01-17 07:27:10

标签: python python-3.x selenium selenium-webdriver

到目前为止,我仅将硒用于测试目的,但这确实很好,我想创建一个脚本来启动网页,但使用带有我所有凭据的常规chrome等。

使用硒时,默认使用ChromeDriver。

任何绕过它的方法吗?还是我不应该?

1 个答案:

答案 0 :(得分:0)

您需要Chrome驱动程序,因为它实现了WebDriver协议并与实际的Chrome浏览器通信。 这样一来,Chrome驱动程序和Chrome即可独立开发和维护,并且WebDriver协议的实现不会使Chrome浏览器的代码杂乱无章。

来自https://sites.google.com/a/chromium.org/chromedriver/

WebDriver is an open source tool for automated testing of webapps across many browsers.
It provides capabilities for navigating to web pages, user input, JavaScript execution, and more.
ChromeDriver is a standalone server that implements the W3C WebDriver standard.