我有Chrome -版本116.0.5845.97(正式版)(64位).我在同一个文件夹中安装的ChromeDriver版本是116.0.5845.96。我找不到完全相同的版本。
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
try:
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))#, options=options
except Exception as e:
print("An error occurred:", str(e))
当我在Python中运行代码时,我得到一条消息:
错误信息:错误信息找不到Chrome二进制文件
1条答案
按热度按时间vbopmzt11#
我不确定版本,如果它们都更新了,那就好了,下面是我初始化
driver
的方法:安装webdriver,如果它没有:
pip install selenium
。