Java Code Examples for com.gargoylesoftware.htmlunit.BrowserVersion.INTERNET_EXPLORER_10

The following are Jave code examples for showing how to use INTERNET_EXPLORER_10 of the com.gargoylesoftware.htmlunit.BrowserVersion class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: webmonitor   File: Configuration.java   View Source Code Vote up 6 votes
@SuppressWarnings("deprecation")
public BrowserVersion getBrowserEnum() {
       if (browserName.equals("Mozilla Firefox 3.6")) {
           return BrowserVersion.FIREFOX_3_6;
       }
       else if (browserName.equals("Mozilla Firefox 10")) {
           return BrowserVersion.FIREFOX_10;
       }
       else if (browserName.equals("Mozilla Firefox 17")) {
           return BrowserVersion.FIREFOX_17;
       }
       else if (browserName.equals("IE 6")) {
           return BrowserVersion.INTERNET_EXPLORER_6;
       } else if (browserName.equals("IE 7")) {
           return BrowserVersion.INTERNET_EXPLORER_7;
       } else if (browserName.equals("IE 8")) {
           return BrowserVersion.INTERNET_EXPLORER_8;
       }
       else if (browserName.equals("IE 9")) {
           return BrowserVersion.INTERNET_EXPLORER_9;
       }
       else if (browserName.equals("IE 10")) {
           return BrowserVersion.INTERNET_EXPLORER_10;
       }        
       return BrowserVersion.getDefault();
   }
 
Example 2
Project: portalsammler   File: DocumentSource.java   View Source Code Vote up 5 votes
protected final WebDriver createDriver(final String url) {
    final HtmlUnitDriver driver = new HtmlUnitDriver(BrowserVersion.INTERNET_EXPLORER_10) {
        {
            this.getWebClient().setRefreshHandler(new AllOrNothingRefreshHandler());
        }
    };


    driver.setJavascriptEnabled(true);
    driver.manage().timeouts().implicitlyWait(WAIT_TIME, TimeUnit.SECONDS);
    driver.get(url);
    return driver;
}