无法启动Chrome驱动程序

问题描述 投票:0回答:1

任何人都可以告诉我下述错误的解决方法吗?

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
#chrome

driver = webdriver.Chrome(executable_path="F:\Drivers\chromedriver.exe")
print ("chrome driver launched successfully...")

错误:

Traceback (most recent call last):
  File "C:/Users/user/PycharmProjects/test_selenium/test.py", line 7, in <module>
    driver = webdriver.Chrome(executable_path="F:\Drivers\chromedriver.exe")
  File "C:\Users\user\PycharmProjects\test_selenium\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
    self.service.start()
  File "C:\Users\user\PycharmProjects\test_selenium\venv\lib\site-packages\selenium\webdriver\common\service.py", line 98, in start
    self.assert_process_still_running()
  File "C:\Users\user\PycharmProjects\test_selenium\venv\lib\site-packages\selenium\webdriver\common\service.py", line 109, in assert_process_still_running
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service F:\Drivers\chromedriver.exe unexpectedly exited. Status code was: 1
python selenium selenium-webdriver selenium-chromedriver selenium-grid
1个回答
0
投票

我不时遇到此错误。对我有用的东西是下载另一个版本的Selenium Web驱动程序(升级始终对我有用,但是如果对您不起作用,请尝试降级)

© www.soinside.com 2019 - 2024. All rights reserved.