1. 程式人生 > 實用技巧 >selenium驅動IE常見問題解決

selenium驅動IE常見問題解決

1、保護模式不一致(全部開啟保護模式)

Caused by: org.openqa.selenium.SessionNotCreatedException: Unexpected error launching Internet Explorer. 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.

參考https://blog.csdn.net/weixin_33700350/article/details/85829139

2、視窗已關閉

Message: Currently focused window has been closed.

解決方法:
第一步:
開啟IE,工具->Internet選項->高階->重置,彈出視窗,選項“刪除個人設定”打上勾,確定重置,回到原始預設狀態;
第二步:
禁用smartscreen,開啟IE,工具->Internet選項->安全->選擇Internet->自定義級別,找到使用 SmartScreen 篩選器,選擇禁用,然後確定;
第三步:
開啟IE,工具->Internet 選項,點選高階標籤,在“加速的圖形"下"使用軟體呈現而不使用GPU呈現"前面打勾。

第四步:
重啟瀏覽器,不需要重啟電腦。

參考https://blog.csdn.net/yinlin330/article/details/86004720