2017-04-20 230 views
0

如果有人可以幫助下面的代碼使用硒webdriver運行IE瀏覽器

包IEProjects;

import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie.InternetExplorerDriver;

public class startIE { 



      public static void main(String[] args) { 

       System.setProperty("webdriver.ie.driver", "C:\\IEDriverServer_Win32_3.3.0\\IEDriverServer.exe"); 
       WebDriver driver = new InternetExplorerDriver();    
       driver.get("http://www.google.com"); 

      } 

     } 

而且我得到下面的結果

Started InternetExplorerDriver server (32-bit) 
3.3.0.0 
Listening on port 29209 
Only local connections are allowed 
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unexpected error launching Internet Explorer. Browser zoom level was set to 150%. It should be set to 100% (WARNING: The server did not provide any stacktrace information) 

它啓動IE瀏覽器,並沒有執行該操作。下面是什麼被印刷在IE頁面

This is the initial start page for the WebDriver server. http://localhost:41380/ 

回答

相關問題