Java Code Examples for org.openqa.selenium.remote.BrowserType#IE

The following examples show how to use org.openqa.selenium.remote.BrowserType#IE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebDriverTestCase.java    From htmlunit with Apache License 2.0 5 votes vote down vote up
private static String getBrowserName(final BrowserVersion browserVersion) {
    if (browserVersion == BrowserVersion.FIREFOX) {
        return BrowserType.FIREFOX + '-' + browserVersion.getBrowserVersionNumeric();
    }
    if (browserVersion == BrowserVersion.FIREFOX_68) {
        return BrowserType.FIREFOX + '-' + browserVersion.getBrowserVersionNumeric();
    }
    else if (browserVersion == BrowserVersion.FIREFOX_60) {
        return BrowserType.FIREFOX + '-' + browserVersion.getBrowserVersionNumeric();
    }
    if (browserVersion == BrowserVersion.INTERNET_EXPLORER) {
        return BrowserType.IE;
    }
    return BrowserType.CHROME;
}
 
Example 2
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 5 votes vote down vote up
@CapabilityFilters({
		@CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE),
		@CapabilityFilter(platform = Platform.WINDOWS, browserName = { BrowserType.FIREFOX, BrowserType.CHROME }) })
@Test
public void multipleFilters() throws Exception {
	assertAssumed(2, 5, 6, 7, 8);
}
 
Example 3
Source File: WebProxyJsonRenderer.java    From selenium-api with MIT License 5 votes vote down vote up
private String consoleIconName(DesiredCapabilities cap) {
  String browserString = cap.getBrowserName();
  if (browserString == null || "".equals(browserString)) {
    return "missingBrowserName";
  }
  
  String ret = browserString;
  
  // Map browser environments to icon names.
  if (browserString.contains("iexplore") || browserString.startsWith("*iehta")) {
    ret = BrowserType.IE;
  } else if (browserString.contains("firefox") || browserString.startsWith("*chrome")) {
    if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("beta") ||
        cap.getBrowserName().toLowerCase().contains("beta")) {
      ret = "firefoxbeta";
    } else if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("aurora") ||
               cap.getBrowserName().toLowerCase().contains("aurora")) {
      ret = "aurora";
    } else if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("nightly") ||
               cap.getBrowserName().toLowerCase().contains("nightly")) {
      ret = "nightly";
    } else {
      ret = BrowserType.FIREFOX;
    }
  
  } else if (browserString.startsWith("*safari")) {
    ret = BrowserType.SAFARI;
  } else if (browserString.startsWith("*googlechrome")) {
    ret = BrowserType.CHROME;
  } else if (browserString.startsWith("opera")) {
    ret = BrowserType.OPERA;
  } else if (browserString.toLowerCase().contains("edge")) {
    ret = BrowserType.EDGE;
  }
  
  return ret.replace(" ", "_");
}
 
Example 4
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 4 votes vote down vote up
@CapabilityFilter(browserName = BrowserType.IE)
@Test
public void singleParam() throws Exception {
	assertAssumed(1, 2);
}
 
Example 5
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 4 votes vote down vote up
@CapabilityFilter(browserName = { BrowserType.IE, BrowserType.CHROME })
@Test
public void multipleParam() throws Exception {
	assertAssumed(1);
}
 
Example 6
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 4 votes vote down vote up
@CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE)
@Test
public void filterPC_browserIE() throws Exception {
	assertAssumed(2, 3, 4, 5, 6, 7, 8);
}
 
Example 7
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 4 votes vote down vote up
@CapabilityFilters(@CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE))
@Test
public void singleFilter() throws Exception {
	assertAssumed(2, 3, 4, 5, 6, 7, 8);
}
 
Example 8
Source File: AssumeCapabilityTest.java    From hifive-pitalium with Apache License 2.0 4 votes vote down vote up
@CapabilityFilters({ @CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE),
		@CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE) })
@Test
public void duplicatedFilters() throws Exception {
	assertAssumed(2, 3, 4, 5, 6, 7, 8);
}
 
Example 9
Source File: InternetExplorerDriverInfo.java    From selenium with Apache License 2.0 4 votes vote down vote up
@Override
public Capabilities getCanonicalCapabilities() {
  return new ImmutableCapabilities(BROWSER_NAME, BrowserType.IE);
}