您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

selenium.common.exceptions.WebDriverException:消息:无头Chrome浏览器的“chromedriver”可执行文件需要出现PATH错误

selenium.common.exceptions.WebDriverException:消息:无头Chrome浏览器的“chromedriver”可执行文件需要出现PATH错误

如果我们分析日志,似乎主要问题在于in 和随后的错误消息 。

因此,从错误中很明显,Python客户端无法找到 二进制文件

您必须在这里注意以下几点:

        from selenium import webdriver  
    from selenium.webdriver.chrome.options import Options 

    chrome_options = Options()  
    chrome_options.add_argument("--headless")  
    driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')  
    driver.get("http://www.duo.com") 
    print("Chrome Browser Initialized in Headless Mode")
    driver.quit()
    print("Driver Exited")
其他 2022/1/1 18:14:51 有487人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶