亲爱的
能帮我解决这个问题吗?我的浏览器在运行期间不再打开。非常感谢您的光临。
我从昨天开始就得到了以下错误:
第一个月
我的代码看起来像这样的开始:
import pyautogui
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
from pynput.keyboard import Key, Controller
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options = Options()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)```
字符串
1条答案
按热度按时间v9tzhpje1#
selenium
4.10.0
和更新版本包含驱动程序管理器,所以您可以这样做:字符串
如果在您的系统PATH中找不到驱动程序,Selenium Manager将自动下载它。
如果你想知道为什么你现在看到错误的
ChromeDriverManager
,这是因为https://chromedriver.chromium.org/downloads只上升到版本114由于驱动程序重组由Chromium团队为新的Chrome-for-Testing。还有SeleniumBase Python selenium框架,它已经在最新版本中修复了Chrome 115问题:(在
pip install seleniumbase
之后,使用python
运行以下操作):型