Internet Explorer WebDriver implementation for Selenium providing automated browser control specifically for IE browsers through the Selenium WebDriver API.
—
Core WebDriver functionality for creating and managing Internet Explorer browser instances. The InternetExplorerDriver class extends RemoteWebDriver and provides the main entry point for IE automation.
The main WebDriver implementation for Internet Explorer automation.
/**
* WebDriver implementation for Internet Explorer browser automation.
* Extends RemoteWebDriver to provide IE-specific functionality.
*/
public class InternetExplorerDriver extends RemoteWebDriver {
/**
* Creates a new InternetExplorerDriver with default service and options.
* Uses createDefaultService() and new InternetExplorerOptions().
*/
public InternetExplorerDriver();
/**
* Creates a new InternetExplorerDriver with custom options.
* Uses default service with provided options.
* @param options IE-specific configuration options
*/
public InternetExplorerDriver(InternetExplorerOptions options);
/**
* Creates a new InternetExplorerDriver with custom service.
* Uses provided service with default options.
* @param service Custom IE driver service configuration
*/
public InternetExplorerDriver(InternetExplorerDriverService service);
/**
* Creates a new InternetExplorerDriver with custom service and options.
* @param service Custom IE driver service configuration
* @param options IE-specific configuration options
*/
public InternetExplorerDriver(
InternetExplorerDriverService service,
InternetExplorerOptions options
);
/**
* Creates a new InternetExplorerDriver with full configuration.
* @param service Custom IE driver service configuration
* @param options IE-specific configuration options
* @param clientConfig HTTP client configuration for WebDriver communication
*/
public InternetExplorerDriver(
InternetExplorerDriverService service,
InternetExplorerOptions options,
ClientConfig clientConfig
);
/**
* Creates a RemoteWebDriverBuilder for IE driver configuration.
* @return Builder instance configured for InternetExplorer
*/
@Beta
public static RemoteWebDriverBuilder builder();
/**
* Overridden to throw WebDriverException - file detection not supported on IE.
* @param detector File detector instance
* @throws WebDriverException Always thrown as operation is not supported
*/
@Override
public void setFileDetector(FileDetector detector);
}Usage Examples:
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;
import org.openqa.selenium.ie.InternetExplorerDriverService;
import org.openqa.selenium.WebDriver;
// Basic usage with defaults
WebDriver driver = new InternetExplorerDriver();
// With custom options
InternetExplorerOptions options = new InternetExplorerOptions()
.ignoreZoomSettings()
.requireWindowFocus();
WebDriver driver = new InternetExplorerDriver(options);
// With custom service
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.withLogLevel(InternetExplorerDriverLogLevel.INFO)
.build();
WebDriver driver = new InternetExplorerDriver(service);
// Full configuration
WebDriver driver = new InternetExplorerDriver(service, options, ClientConfig.defaultConfig());
// Using builder pattern (Beta)
WebDriver driver = InternetExplorerDriver.builder()
.oneOf(new InternetExplorerOptions().ignoreZoomSettings())
.build();String constants for IE-specific WebDriver capabilities.
/**
* Capability constants for Internet Explorer WebDriver configuration.
* These constants are used with InternetExplorerOptions or direct capability setting.
*/
public static final String IGNORE_ZOOM_SETTING = "ignoreZoomSetting";
public static final String INITIAL_BROWSER_URL = "initialBrowserUrl";
public static final String ELEMENT_SCROLL_BEHAVIOR = "elementScrollBehavior";
public static final String ENABLE_ELEMENT_CACHE_CLEANUP = "enableElementCacheCleanup";
public static final String BROWSER_ATTACH_TIMEOUT = "browserAttachTimeout";
public static final String INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS = "ignoreProtectedModeSettings";
public static final String ENABLE_PERSISTENT_HOVERING = "enablePersistentHover";
public static final String REQUIRE_WINDOW_FOCUS = "requireWindowFocus";
public static final String FORCE_CREATE_PROCESS = "ie.forceCreateProcessApi";
public static final String IE_ENSURE_CLEAN_SESSION = "ie.ensureCleanSession";
public static final String IE_USE_PER_PROCESS_PROXY = "ie.usePerProcessProxy";
public static final String IE_SWITCHES = "ie.browserCommandLineSwitches";The driver automatically validates platform compatibility.
/**
* Validates that the current platform is Windows.
* Called automatically during driver initialization.
* @throws WebDriverException if not running on Windows platform
*/
protected void assertOnWindows();Platform Requirements:
Common error scenarios and their handling:
WebDriverException: Thrown for general driver errors including:
SessionNotCreatedException: Thrown when IE browser session cannot be created due to:
The IE driver can be used with Selenium Grid for distributed testing:
// Grid configuration
DesiredCapabilities caps = new DesiredCapabilities();
caps.setBrowserName("internet explorer");
caps.merge(new InternetExplorerOptions().ignoreZoomSettings());
WebDriver driver = new RemoteWebDriver(gridUrl, caps);WebDriverInfo implementation providing metadata and factory functionality for Internet Explorer driver.
/**
* WebDriverInfo implementation for Internet Explorer driver.
* Provides metadata, capability checking, and driver instantiation.
*/
@AutoService(WebDriverInfo.class)
public class InternetExplorerDriverInfo implements WebDriverInfo {
/**
* Returns the display name for this driver.
* @return "Internet Explorer"
*/
public String getDisplayName();
/**
* Returns canonical capabilities for IE driver.
* @return Capabilities with browser name set to "internet explorer"
*/
public Capabilities getCanonicalCapabilities();
/**
* Checks if this driver supports the given capabilities.
* @param capabilities Capabilities to check
* @return true if IE browser or se:ieOptions capability present
*/
public boolean isSupporting(Capabilities capabilities);
/**
* Indicates CDP (Chrome DevTools Protocol) support.
* @return false - IE driver does not support CDP
*/
public boolean isSupportingCdp();
/**
* Indicates BiDi (Bidirectional WebDriver protocol) support.
* @return false - IE driver does not support BiDi
*/
public boolean isSupportingBiDi();
/**
* Checks if IE driver is available on current platform.
* @return true if Windows platform and IEDriverServer is available
*/
public boolean isAvailable();
/**
* Checks if IE driver executable is present.
* @return true if Windows platform and IEDriverServer executable found
*/
public boolean isPresent();
/**
* Returns maximum simultaneous sessions supported.
* @return 1 - IE driver supports only single session
*/
public int getMaximumSimultaneousSessions();
/**
* Creates IE driver instance with given capabilities.
* @param capabilities Capabilities to use
* @return Optional containing InternetExplorerDriver or empty if unavailable
*/
public Optional<WebDriver> createDriver(Capabilities capabilities);
}Usage Examples:
import org.openqa.selenium.ie.InternetExplorerDriverInfo;
import org.openqa.selenium.WebDriverInfo;
import org.openqa.selenium.Capabilities;
// Check driver availability
InternetExplorerDriverInfo driverInfo = new InternetExplorerDriverInfo();
if (driverInfo.isAvailable()) {
System.out.println("IE driver is available");
System.out.println("Display name: " + driverInfo.getDisplayName());
System.out.println("Max sessions: " + driverInfo.getMaximumSimultaneousSessions());
}
// Check capability support
Capabilities caps = new DesiredCapabilities();
caps.setCapability("browserName", "internet explorer");
if (driverInfo.isSupporting(caps)) {
Optional<WebDriver> driver = driverInfo.createDriver(caps);
if (driver.isPresent()) {
// Use the driver
driver.get().quit();
}
}Install with Tessl CLI
npx tessl i tessl/maven-org-seleniumhq-selenium--selenium-ie-driver