ScreenshotNeo

BlogGuides

Testing Legacy Browsers with Selenium: Challenges and Workarounds

Use Selenium with Edge IE Mode for legacy sites, or configure standalone IE 11 in a controlled Windows environment. Includes setup, runnable examples, and fixes for common failures.

By the ScreenshotNeo team4 October 20269 min read

For a legacy site that needs Internet Explorer behavior, Selenium’s preferred path is Microsoft Edge in IE Compatibility Mode, driven with Selenium’s Internet Explorer driver classes. Selenium ended official support for standalone Internet Explorer in June 2022. Standalone IE Driver remains documented for controlled Windows environments, but it has strict setup requirements and known reliability limits. If the tested workflow does not need IE-specific behavior, use ordinary Edge WebDriver instead.

This guide explains how to choose the right browser path, configure Selenium, write runnable examples, and troubleshoot the failures most often caused by legacy browser environments.

1. Choose the browser path that matches the requirement

Option Use it when Platform and support Tradeoff
Edge IE Compatibility Mode with Selenium IE Driver classes The application needs IE rendering or behavior and Edge IE Mode is available. Selenium documents this as the forward path for IE sites. Requires Edge IE Mode policy and site-list configuration, plus validation that the site opened in compatibility mode.
Standalone IE 11 with IE Driver Server A controlled legacy Windows environment must exercise the actual IE 11 browser. Windows only. Selenium identifies IE 11 on Windows 10 as tested; older combinations are unsupported. Configuration-heavy and vulnerable to focus-related native mouse event issues. Selenium no longer officially supports standalone IE.
Ordinary Microsoft Edge WebDriver The workflow does not require IE-specific behavior. Use EdgeDriver with the same major version as Edge. Selenium Manager is the default driver management mechanism in current bindings. Does not reproduce IE rendering or behavior.

Start by identifying the specific behavior under test: a rendering defect, an IE-only script path, an enterprise intranet dependency, or an old-browser fallback. Do not assume that a site needs IE just because it is old. Confirm the relevant behavior with the application owner and make the compatibility requirement part of the test plan.

2. Preferred setup: Selenium with Edge IE Mode

Configure IE Mode for the target site through the organization’s Microsoft Edge policy and site list. The exact policy mechanism is environment-specific, so follow the organization’s Windows and Edge administration process. Then create an IE Driver session and attach it to Edge. Selenium’s documentation says IE Driver 4.5.0 and later can locate Edge automatically in the configurations it describes; provide an Edge executable path only when the host requires it.

Java example

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;

public class IeModeSmokeTest {
    public static void main(String[] args) {
        InternetExplorerOptions options = new InternetExplorerOptions();
        options.attachToEdgeChrome();
        // If automatic discovery is unsuitable on this host, configure the
        // Edge executable path using the API supported by your Selenium version.

        WebDriver driver = new InternetExplorerDriver(options);
        try {
            driver.get("https://legacy.example.com/");
            System.out.println("Title: " + driver.getTitle());
            // Add assertions for the critical workflow and its expected result.
        } finally {
            driver.quit();
        }
    }
}

This example assumes Selenium Java dependencies are already part of the project. Use the Selenium binding and dependency version managed by your build. The key configuration is InternetExplorerOptions with attachToEdgeChrome() and an InternetExplorerDriver session.

Validate that IE Mode is actually active

  1. Open the target URL in the automated session.
  2. Verify the browser is using the organization’s intended IE Mode site-list and policy configuration. A normal Edge page is not evidence of IE compatibility behavior.
  3. Run a small smoke workflow that exercises the IE-specific behavior the application depends on.
  4. Keep a separate test for ordinary Edge if the application also supports the modern browser path.

3. Constrained setup: standalone Internet Explorer 11

Use standalone IE only when the test needs the actual IE 11 browser and a controlled Windows machine is available. Selenium’s IE Driver Server documentation says it was tested with IE 11 on Windows 10; older versions might work but are unsupported. The driver is Windows-only.

Before starting the driver, prepare the test machine according to Selenium’s documented requirements:

  • Protected Mode: Set it to the same state for every security zone.
  • Enhanced Protected Mode: Disable it for IE 10 and later as the Selenium setup instructions specify.
  • Zoom and display scaling: Set browser zoom to 100%. On Windows 10, set display scaling to 100% as directed by the documentation.
  • IE 11 registry setting: Create the documented FEATURE_BFCACHE value iexplore.exe as a DWORD set to 0, under the architecture-appropriate registry path.
  • Driver binary: Make the IE Driver Server executable available to the environment, for example through PATH. Use a binary matching the browser architecture; Selenium’s downloads page labels 32-bit Windows IE as recommended.

Registry and security setting changes should follow the organization’s change-control process. The registry path is architecture-specific, so consult Selenium’s IE Driver Server documentation rather than copying a path from a different host. Selenium warns that ignoreProtectedModeSettings is a best-effort bypass that can lead to flaky, unresponsive, or hung sessions. Matching the real zone settings is preferable.

Java example for standalone IE

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;

public class StandaloneIeSmokeTest {
    public static void main(String[] args) {
        InternetExplorerOptions options = new InternetExplorerOptions();
        WebDriver driver = new InternetExplorerDriver(options);
        try {
            driver.get("https://legacy.example.com/");
            System.out.println("Title: " + driver.getTitle());
            // Exercise the required IE 11 workflow here.
        } finally {
            driver.quit();
        }
    }
}

Run this on the prepared Windows host with the matching IE Driver Server available. Keep the browser visible and focused when tests rely on native mouse events.

4. Ordinary Edge automation for workflows that do not need IE

For a modern Edge session, use Selenium’s Edge support. EdgeDriver’s major version must match the Edge browser’s major version. Selenium Manager is built into current bindings and is the default driver and browser management mechanism; explicit executable paths remain available when the environment requires them.

Java example

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;

public class EdgeSmokeTest {
    public static void main(String[] args) {
        WebDriver driver = new EdgeDriver(); // Selenium Manager handles driver management by default.
        try {
            driver.get("https://example.com/");
            System.out.println("Title: " + driver.getTitle());
        } finally {
            driver.quit();
        }
    }
}

5. Run legacy browser tests reliably

  • Keep IE machines dedicated during runs where possible. IE’s native mouse events can misbehave when its window lacks focus. Unrelated desktop activity can make a click appear to focus an element without activating it.
  • Use explicit readiness checks. Wait for the application’s meaningful page state or element before interacting; fixed delays can be both slow and unreliable when page load times vary.
  • Separate compatibility coverage from broad regression coverage. Keep the IE-specific suite focused on the workflows that depend on IE behavior, and run general coverage in a currently supported browser.
  • Record the environment with failures. Capture the Windows version, browser and driver architecture, Edge or IE version, zoom and scaling values, and whether the run was focused. These details help distinguish application regressions from host configuration problems.
  • Validate the browser path at session start. A test that silently runs in ordinary Edge cannot establish that IE Mode behavior works.

6. Troubleshooting common Selenium legacy browser failures

Symptom Likely cause Fix
Session creation or browser startup fails Driver binary is absent, wrong architecture, or environment setup is incomplete. Confirm the browser and IE Driver Server are present, use the matching architecture, and make the executable available through the environment (for example, PATH).
A click focuses an element but does not activate it IE native mouse events can fail while the browser window is unfocused. Run visibly in a focused, dedicated session where practical, and avoid other desktop activity during the run.
Click coordinates or element positions are wrong Browser zoom or Windows display scaling differs from the documented configuration. Set zoom to 100%, and on Windows 10 set display scaling to 100% as Selenium directs.
Protected Mode exception at startup Protected Mode differs across IE security zones. Make the setting consistent across zones. Do not use ignoreProtectedModeSettings as the first fix because it can destabilize sessions.
IE 11 hangs or fails to connect The documented back-forward cache registry value may be missing or in the wrong architecture-specific registry path. Verify the FEATURE_BFCACHE iexplore.exe DWORD value is 0 at the path for the host architecture.
Edge WebDriver reports a version mismatch EdgeDriver and the Edge browser have different major versions. Align their major versions or use Selenium Manager where the environment permits it.
Tests pass locally but fail on a shared desktop Focus-sensitive input and concurrent desktop activity can interfere with IE. Reserve a focused machine for the IE run, or move the test to a controlled Windows environment.
IE Mode tests appear to behave like ordinary Edge The policy or site list did not route the target site into IE Mode. Check the organization’s IE Mode policy and site list, then confirm the browser actually entered compatibility mode before interpreting the result.

7. Performance, reliability, and maintenance costs

Legacy browser testing has environmental costs that do not appear in a typical modern-browser run. Standalone IE is Windows-only, requires configuration-sensitive host preparation, and can depend on a focused desktop session. These constraints make parallel, unattended runs harder to maintain. Keep the standalone IE suite narrow and reserve it for behavior that cannot be covered in Edge IE Mode or a modern browser.

Edge IE Mode still requires site routing and policy configuration, but it is Selenium’s documented direction for IE-dependent sites. Ordinary Edge is a better fit when no IE behavior is required; Selenium Manager can reduce manual driver setup, while the EdgeDriver and Edge major versions still need to align. Revisit the need for IE coverage as the application changes, so unsupported standalone IE does not become the default for all browser testing.

8. Or skip the browser setup

If the task is to capture a page image or PDF rather than exercise interactive browser behavior, ScreenshotNeo provides a website screenshot API and MCP server for developers. It does not replace Selenium for interaction tests, but it avoids maintaining a browser driver for capture work.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://legacy.example.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://legacy.example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://legacy.example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets. Bot checks, blank pages, timeouts and failed loads are never billed, and cache hits are free; response headers identify the page verdict and billing status. Its MCP server includes tools for AI agents to take screenshots, inspect page information, and capture PDFs. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000 screenshots.

Sign up for 1,000 free screenshots a month, with no card required.

9. FAQ

Does Selenium still support Internet Explorer?

Selenium ended official support for standalone Internet Explorer in June 2022. Selenium’s documented path for IE sites is IE Mode in Microsoft Edge, driven with the IE Driver classes.

Can I run standalone IE Driver on Linux or macOS?

No. Selenium documents IE Driver as Windows-only.

Does Edge IE Mode mean every Edge test is an IE test?

No. Ordinary Edge WebDriver automates Edge normally. IE Mode requires the relevant site and policy configuration and must be validated for the target URL.

Should I set ignoreProtectedModeSettings to fix startup?

Not as the first remedy. Selenium warns that skipping the checks can make sessions flaky, unresponsive, or hung. Match Protected Mode settings across zones first.

Can ScreenshotNeo test clicks and JavaScript workflows?

ScreenshotNeo captures screenshots and PDFs; it is not a replacement for Selenium interaction tests. Use it when the deliverable is a page capture rather than browser-driven workflow validation.

Sources