Selenium調用IE時報“The path to the driver executable must be set by the webdriver.ie.driver system property”


【問題現象】Selenium調用IE時報“The path to the driver executable must be set by the webdriver.ie.driver system property”

【解決方法】

 步驟一:按照博客http://blog.csdn.net/jichuang123/article/details/53008581中描述檢查IE版本,Selenium版本,同時按文章中給出的網址下載對應Selenium版本的IEDriver;若按文章所述排查完畢后執行代碼仍然報上述錯誤,則進行步驟二檢查;

 步驟二:排查代碼查看是不是因為在創建了Driver之后才設置IEDriver的路徑,具體錯誤代碼如下:

正確的方式應該是先使用System.setProperty設置IEDriver的路徑,之后再創建IEDriver才對。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM