Internet Explorer WebDriver implementation for Selenium providing automated browser control specifically for IE browsers through the Selenium WebDriver API.
—
Service lifecycle management for the IEDriverServer executable, including process creation, configuration, and cleanup. The InternetExplorerDriverService class manages the IEDriverServer process that communicates between WebDriver and Internet Explorer.
Main service class for managing IEDriverServer process lifecycle.
/**
* Manages the life and death of an IEDriverServer process.
* Extends DriverService to provide IE-specific functionality.
*/
public class InternetExplorerDriverService extends DriverService {
/**
* Creates InternetExplorerDriverService with full configuration.
* @param executable The IEDriverServer executable file
* @param port Port number for the driver server
* @param timeout Timeout waiting for driver server to start
* @param args Command line arguments for the server
* @param environment Environment variables for the server process
* @throws IOException If an I/O error occurs during service creation
*/
public InternetExplorerDriverService(
File executable,
int port,
Duration timeout,
List<String> args,
Map<String, String> environment
) throws IOException;
/**
* Returns the driver executable name.
* @return "IEDriverServer"
*/
public String getDriverName();
/**
* Returns the system property name for driver executable path.
* @return "webdriver.ie.driver"
*/
public String getDriverProperty();
/**
* Returns default driver options for this service.
* @return New InternetExplorerOptions instance
*/
@Override
public Capabilities getDefaultDriverOptions();
/**
* Creates a default InternetExplorerDriverService instance.
* Uses default configuration with free port and default executable path.
* @return Configured InternetExplorerDriverService instance
*/
public static InternetExplorerDriverService createDefaultService();
}System property constants for configuring IEDriverServer behavior.
/**
* System property constants for IE driver service configuration.
*/
public static final String IE_DRIVER_NAME = "IEDriverServer";
public static final String IE_DRIVER_EXE_PROPERTY = "webdriver.ie.driver";
public static final String IE_DRIVER_LOGFILE_PROPERTY = "webdriver.ie.driver.logfile";
public static final String IE_DRIVER_LOGLEVEL_PROPERTY = "webdriver.ie.driver.loglevel";
public static final String IE_DRIVER_HOST_PROPERTY = "webdriver.ie.driver.host";
public static final String IE_DRIVER_EXTRACT_PATH_PROPERTY = "webdriver.ie.driver.extractpath";
public static final String IE_DRIVER_SILENT_PROPERTY = "webdriver.ie.driver.silent";Builder pattern implementation for configuring InternetExplorerDriverService instances.
/**
* Builder for configuring InternetExplorerDriverService instances.
* Provides fluent API for service configuration.
*/
@AutoService(DriverService.Builder.class)
public static class Builder extends DriverService.Builder<
InternetExplorerDriverService,
InternetExplorerDriverService.Builder
> {
/**
* Scores capability compatibility for this driver service.
* Higher scores indicate better compatibility.
* @param capabilities WebDriver capabilities to evaluate
* @return Compatibility score (0 = not compatible, higher = more compatible)
*/
@Override
public int score(Capabilities capabilities);
/**
* Configures the logging level for the driver server.
* @param logLevel Log verbosity level
* @return Builder instance for method chaining
*/
public Builder withLogLevel(InternetExplorerDriverLogLevel logLevel);
/**
* Configures the host to which the driver server will be bound.
* @param host Host name or IP address
* @return Builder instance for method chaining
*/
public Builder withHost(String host);
/**
* Configures path where driver server library will be extracted.
* @param extractPath Directory path for extraction
* @return Builder instance for method chaining
*/
public Builder withExtractPath(File extractPath);
/**
* Configures silence mode for driver server stdout.
* @param silent True to suppress unlogged messages to stdout
* @return Builder instance for method chaining
*/
public Builder withSilent(Boolean silent);
}import org.openqa.selenium.ie.InternetExplorerDriverService;
import org.openqa.selenium.ie.InternetExplorerDriver;
// Create default service
InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService();
// Use with driver
WebDriver driver = new InternetExplorerDriver(service);import org.openqa.selenium.ie.InternetExplorerDriverService;
import org.openqa.selenium.ie.InternetExplorerDriverLogLevel;
import java.io.File;
// Build custom service
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.withLogLevel(InternetExplorerDriverLogLevel.INFO)
.withHost("localhost")
.withExtractPath(new File("C:\\temp\\iedriver"))
.withSilent(false)
.build();
WebDriver driver = new InternetExplorerDriver(service);// Set system properties before service creation
System.setProperty("webdriver.ie.driver", "C:\\drivers\\IEDriverServer.exe");
System.setProperty("webdriver.ie.driver.logfile", "C:\\logs\\iedriver.log");
System.setProperty("webdriver.ie.driver.loglevel", "INFO");
System.setProperty("webdriver.ie.driver.host", "127.0.0.1");
// Service will use system properties
InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService();import java.time.Duration;
import java.util.Arrays;
import java.util.HashMap;
// Manual service construction with full control
File executable = new File("C:\\drivers\\IEDriverServer.exe");
int port = 9515;
Duration timeout = Duration.ofSeconds(30);
List<String> args = Arrays.asList(
"--port=9515",
"--log-level=INFO",
"--host=localhost"
);
Map<String, String> environment = new HashMap<>();
environment.put("PATH", System.getenv("PATH"));
InternetExplorerDriverService service = new InternetExplorerDriverService(
executable, port, timeout, args, environment
);The InternetExplorerDriverLogLevel enum provides different verbosity levels:
/**
* Log level enumeration for IEDriverServer logging.
*/
public enum InternetExplorerDriverLogLevel {
TRACE, // Most verbose - traces all operations
DEBUG, // Debug information for troubleshooting
INFO, // General information about operations
WARN, // Warning messages for potential issues
ERROR, // Error messages for failures
FATAL // Critical errors that cause termination
}Usage:
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.withLogLevel(InternetExplorerDriverLogLevel.DEBUG)
.build();When using InternetExplorerDriver constructors, the service is automatically managed:
// Service automatically started and stopped
WebDriver driver = new InternetExplorerDriver();
// ... use driver
driver.quit(); // Service automatically stoppedFor more control over service lifecycle:
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.withLogLevel(InternetExplorerDriverLogLevel.INFO)
.build();
try {
service.start(); // Manually start service
// Create driver with existing service
WebDriver driver = new InternetExplorerDriver(service);
// ... use driver
driver.quit();
} finally {
service.stop(); // Manually stop service
}The service integrates with Selenium Manager for automatic driver management:
// Selenium Manager automatically downloads and configures IEDriverServer
InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService();
// Driver executable is automatically located and configuredServices can be configured for Selenium Grid environments:
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.withHost("0.0.0.0") // Bind to all interfaces for Grid
.withLogLevel(InternetExplorerDriverLogLevel.WARN)
.build();Common service-related issues and solutions:
Service Start Failures:
Communication Issues:
Performance Issues:
Install with Tessl CLI
npx tessl i tessl/maven-org-seleniumhq-selenium--selenium-ie-driver