selenium控制瀏覽器需要下載對應版本的驅動,並把下載好的驅動解壓然后拷貝到python的安裝目錄。
1、chrome
驅動對應版本及下載地址;https://npm.taobao.org/mirrors/chromedriver/
2、firefox
驅動下載地址 ;https://github.com/mozilla/geckodriver/releases/
3、IE
驅動下載地址;http://www.cr173.com/soft/195732.html
IE的啟用保護模式
打開IE——》設置——》Internet選項——》安全——》啟用保護模式前的對勾,4個需全部勾選或全部不勾選,否則會報以下錯誤;
"Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones."