原因
找不到driver的路径,需要将driver的路径加上
解决办法:
1. 下载:
FireFox的驱动,gechodriver(蜥蜴驱动?!),找如下链接里面对应操作系统的:
https://github.com/mozilla/geckodriver/releases
IE的驱动,edge(边界?!),找如下链接里面的Download:
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Chrome驱动,比较朴素地依旧命名为chromedriver:
https://sites.google.com/a/chromium.org/chromedriver/
其它的驱动,参考官网,能想到的驱动都在这里了。
http://www.seleniumhq.org/download/
2.代码如下:
from selenium import webdriver
chromeOptions = webdriver.ChromeOptions()
url = "https://blog.csdn.net/github_39570717/article/details/88852250"
browser = webdriver.Chrome(executable_path="E:\driver\chromedriver_win32\chromedriver.exe",chrome_options = chromeOptions)