【发布时间】:2020-04-26 07:09:00
【问题描述】:
运行此简单代码时,会打开一个空白页面,其中包含 url 中写入的“data:”。 Chrome 驱动程序是正确的版本 (ChromeDriver 81.0.4044.69) 并且与我的 GoogleChrome 版本 (81.0.4044.122) 匹配。 Selenium 也更新了 (3.141.0)
我还将驱动程序的文件夹添加到系统的 PATH 中。 还尝试在 url 中使用 http 而不是 https。
from selenium import webdriver
class GoogleBot:
def __init__(self):
self.driver = webdriver.Chrome(executable_path="C:\Drivers\chromedriver.exe")
driver.get("https://www.google.es/")
GoogleBot()
【问题讨论】:
标签: python selenium selenium-chromedriver