【問題現象】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才對。