Internet Explorer WebDriver implementation for Selenium providing automated browser control specifically for IE browsers through the Selenium WebDriver API.
—
Comprehensive configuration system for IE-specific browser settings and behaviors. The InternetExplorerOptions class provides a fluent API for configuring Internet Explorer WebDriver capabilities.
Main configuration class extending AbstractDriverOptions with IE-specific functionality.
/**
* Configuration options for Internet Explorer WebDriver.
* Provides fluent API for setting IE-specific capabilities.
*/
public class InternetExplorerOptions extends AbstractDriverOptions<InternetExplorerOptions> {
public static final String IE_OPTIONS = "se:ieOptions";
/**
* Creates default InternetExplorerOptions with browser name set to IE.
*/
public InternetExplorerOptions();
/**
* Creates InternetExplorerOptions from existing capabilities.
* @param source Existing capabilities to copy from
*/
public InternetExplorerOptions(Capabilities source);
/**
* Merges this options with additional capabilities.
* @param extraCapabilities Additional capabilities to merge
* @return New InternetExplorerOptions instance with merged capabilities
*/
@Override
public InternetExplorerOptions merge(Capabilities extraCapabilities);
}Methods for configuring IE browser behavior and interaction patterns.
/**
* Ignores the browser zoom level during automation.
* Prevents zoom-related element location issues.
* @return Self reference for method chaining
*/
public InternetExplorerOptions ignoreZoomSettings();
/**
* Requires window focus before performing operations.
* Ensures reliable element interaction in multi-window environments.
* @return Self reference for method chaining
*/
public InternetExplorerOptions requireWindowFocus();
/**
* Enables persistent sending of WM_MOUSEMOVE messages during mouse hover.
* Improves hover behavior reliability.
* @return Self reference for method chaining
*/
public InternetExplorerOptions enablePersistentHovering();
/**
* Sets the initial URL to load when IE launches.
* @param url Initial browser URL (cannot be null)
* @return Self reference for method chaining
*/
public InternetExplorerOptions withInitialBrowserUrl(String url);
/**
* Configures how elements are scrolled into view.
* @param behavior Scroll behavior (TOP or BOTTOM)
* @return Self reference for method chaining
*/
public InternetExplorerOptions elementScrollTo(ElementScrollBehavior behavior);Methods for configuring various timeout values.
/**
* Sets timeout for attaching to new browser windows.
* @param duration Timeout duration
* @param unit Time unit for duration
* @return Self reference for method chaining
*/
public InternetExplorerOptions withAttachTimeout(long duration, TimeUnit unit);
/**
* Sets timeout for attaching to new browser windows.
* @param duration Timeout as Duration object
* @return Self reference for method chaining
*/
public InternetExplorerOptions withAttachTimeout(Duration duration);
/**
* Sets timeout for file upload dialog operations.
* @param duration Timeout duration
* @param unit Time unit for duration
* @return Self reference for method chaining
*/
public InternetExplorerOptions waitForUploadDialogUpTo(long duration, TimeUnit unit);
/**
* Sets timeout for file upload dialog operations.
* @param duration Timeout as Duration object
* @return Self reference for method chaining
*/
public InternetExplorerOptions waitForUploadDialogUpTo(Duration duration);Methods for configuring IE process creation and Windows API usage.
/**
* Forces use of Windows CreateProcess API when launching IE.
* Alternative to default ShellExecute method.
* @return Self reference for method chaining
*/
public InternetExplorerOptions useCreateProcessApiToLaunchIe();
/**
* Uses Windows ShellWindows API when attaching to IE instances.
* Alternative attachment mechanism.
* @return Self reference for method chaining
*/
public InternetExplorerOptions useShellWindowsApiToAttachToIe();
/**
* Adds command line switches for IE process when using CreateProcess API.
* @param switches Variable number of command line switches
* @return Self reference for method chaining
*/
public InternetExplorerOptions addCommandSwitches(String... switches);
/**
* Uses per-process proxy settings instead of system-wide proxy.
* Only valid with DIRECT, MANUAL, or SYSTEM proxy types.
* @return Self reference for method chaining
*/
public InternetExplorerOptions usePerProcessProxy();Methods for managing IE sessions and browser cache.
/**
* Clears Internet Explorer cache before launching browser.
* WARNING: Clears system cache for ALL IE instances, including existing ones.
* @return Self reference for method chaining
*/
public InternetExplorerOptions destructivelyEnsureCleanSession();Methods for handling IE security domains and protected mode settings.
/**
* Ignores browser protected mode settings during startup.
* WARNING: Makes tests unstable and hard to debug. Use with caution.
* @return Self reference for method chaining
*/
public InternetExplorerOptions introduceFlakinessByIgnoringSecurityDomains();Methods for configuring screenshot behavior and dialog handling.
/**
* Enables full page screenshot capture instead of viewport-only.
* @return Self reference for method chaining
*/
public InternetExplorerOptions takeFullPageScreenshot();
/**
* Uses legacy file upload dialog handling mechanism.
* For compatibility with older IE versions or specific configurations.
* @return Self reference for method chaining
*/
public InternetExplorerOptions useLegacyUploadDialog();Methods for integrating with Microsoft Edge in IE mode.
/**
* Configures IE driver to attach to Edge browser in IE mode.
* @return Self reference for method chaining
*/
public InternetExplorerOptions attachToEdgeChrome();
/**
* Sets path to Edge executable for IE mode operations.
* @param path Full path to Edge executable
* @return Self reference for method chaining
*/
public InternetExplorerOptions withEdgeExecutablePath(String path);
/**
* Ignores process matching when attaching to browser instances.
* @return Self reference for method chaining
*/
public InternetExplorerOptions ignoreProcessMatch();InternetExplorerOptions options = new InternetExplorerOptions()
.ignoreZoomSettings()
.requireWindowFocus()
.enablePersistentHovering();
WebDriver driver = new InternetExplorerDriver(options);InternetExplorerOptions options = new InternetExplorerOptions()
.withAttachTimeout(30, TimeUnit.SECONDS)
.waitForUploadDialogUpTo(Duration.ofMinutes(2));InternetExplorerOptions options = new InternetExplorerOptions()
.useCreateProcessApiToLaunchIe()
.addCommandSwitches("-private", "-noframemerging")
.usePerProcessProxy()
.destructivelyEnsureCleanSession();InternetExplorerOptions options = new InternetExplorerOptions()
.attachToEdgeChrome()
.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe")
.ignoreProcessMatch();InternetExplorerOptions options = new InternetExplorerOptions()
.withInitialBrowserUrl("about:blank")
.takeFullPageScreenshot()
.useLegacyUploadDialog()
// Use with extreme caution:
.introduceFlakinessByIgnoringSecurityDomains();ignoreZoomSettings() for consistent element locationrequireWindowFocus() in multi-window test environmentsintroduceFlakinessByIgnoringSecurityDomains() unless absolutely necessarydestructivelyEnsureCleanSession() carefully as it affects all IE instancesAll IE-specific capability constants used internally by InternetExplorerOptions:
/**
* Capability constants used by InternetExplorerOptions.
* These are automatically set by the fluent API methods.
*/
public static final String IE_OPTIONS = "se:ieOptions";
// Private capability constants (used internally)
private static final String FULL_PAGE_SCREENSHOT = "ie.enableFullPageScreenshot";
private static final String UPLOAD_DIALOG_TIMEOUT = "ie.fileUploadDialogTimeout";
private static final String FORCE_WINDOW_SHELL_API = "ie.forceShellWindowsApi";
private static final String LEGACY_FILE_UPLOAD_DIALOG_HANDLING = "ie.useLegacyFileUploadDialogHandling";
private static final String ATTACH_TO_EDGE_CHROME = "ie.edgechromium";
private static final String EDGE_EXECUTABLE_PATH = "ie.edgepath";
private static final String IGNORE_PROCESS_MATCH = "ie.ignoreprocessmatch";InternetExplorerOptions extends AbstractDriverOptions, providing access to standard WebDriver capabilities:
Install with Tessl CLI
npx tessl i tessl/maven-org-seleniumhq-selenium--selenium-ie-driver