我下載的驅動程序,我給我的代碼的確切路徑,但是,當我跑它顯示的代碼我錯誤如何開始InternetExplorerDriver使用硒的webdriver
我用java代碼如下:
System.out.println("Internet Explorer is selected");
System.setProperty("webdriver.ie.driver","C:\\Program Files\\Selenium\\Drivers\\IEDriver\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
selenium = new WebDriverBackedSelenium(driver, "http://www.datamoat.com/");
和錯誤消息是
org.openqa.selenium.remote.SessionNotFoundException: 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. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.15 seconds
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'SAKIB-PC', ip: '192.168.10.70', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_25'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
閱讀錯誤消息。它說什麼? – Arran
錯誤的主要部分是「保護模式設置對於所有區域都不相同」。因此,爲所有區域設置相同的保護模式。 –