CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-seleniumhq-selenium--selenium-ie-driver

Internet Explorer WebDriver implementation for Selenium providing automated browser control specifically for IE browsers through the Selenium WebDriver API.

Pending
Overview
Eval results
Files

service.mddocs/

Service Management

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.

Capabilities

InternetExplorerDriverService Class

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();
}

Service Constants

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";

Service Builder

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);
}

Usage Examples

Default Service Creation

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);

Custom Service Configuration

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);

System Property Configuration

// 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();

Manual Service Construction

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
);

Log Level Configuration

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();

Service Lifecycle Management

Automatic Management

When using InternetExplorerDriver constructors, the service is automatically managed:

// Service automatically started and stopped
WebDriver driver = new InternetExplorerDriver();
// ... use driver
driver.quit(); // Service automatically stopped

Manual Management

For 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
}

System Integration

Selenium Manager Integration

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 configured

Grid Integration

Services 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();

Best Practices

  1. Resource Management: Always ensure services are properly stopped to avoid resource leaks
  2. Port Configuration: Use free ports to avoid conflicts in multi-instance environments
  3. Logging: Configure appropriate log levels for debugging vs. production use
  4. Host Binding: Use specific host binding for security in networked environments
  5. Timeout Values: Set reasonable timeouts based on system performance
  6. Path Management: Use absolute paths for executable and extraction directories
  7. Environment Variables: Properly configure PATH and other environment variables
  8. Service Reuse: Consider reusing services across multiple test sessions for efficiency

Troubleshooting

Common service-related issues and solutions:

Service Start Failures:

  • Verify IEDriverServer.exe is available and executable
  • Check port availability and permissions
  • Validate system PATH configuration

Communication Issues:

  • Verify host and port configuration
  • Check firewall and network settings
  • Review log files for detailed error information

Performance Issues:

  • Adjust timeout values based on system performance
  • Consider service reuse patterns for test suites
  • Monitor resource usage and cleanup

Install with Tessl CLI

npx tessl i tessl/maven-org-seleniumhq-selenium--selenium-ie-driver

docs

index.md

options.md

service.md

webdriver.md

tile.json