Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Blog
- /
- Selenium IE Driver: Run Tests in IE Mode in Edge
Selenium IE Driver: Run Tests in IE Mode in Edge
Set up IEDriverServer, apply the required Windows settings, and run Selenium tests in IE mode in Microsoft Edge with Python, Java, C# and a cloud grid.
Last Updated on:
Some enterprise web apps still only work correctly in Internet Explorer, so they still need Selenium tests that run in Internet Explorer's engine. Microsoft's guide to automating IE mode notes that IE 11 is no longer supported on certain Windows 10 versions from June 15, 2022, and points those teams to IE mode in Microsoft Edge.
Below is the IEDriverServer setup for IE mode, the same test in Python, Java and C#, and a TestMu AI cloud run that shows where IE mode breaks a modern page. For Selenium on Chromium-based Edge itself, see the guide to Selenium automation testing on Microsoft Edge.
TL;DR
The Selenium IE Driver (IEDriverServer) is the WebDriver server that drives Internet Explorer's engine. With the IE 11 desktop app retired on many Windows 10 versions, you now use it to run tests in IE mode in Microsoft Edge by setting attachToEdgeChrome and the Edge executable path in InternetExplorerOptions.
- IEDriverServer 4.14.0: IEDriverServer 4.14.0 is the current Selenium IE Driver on the selenium.dev downloads page, where the 32-bit build is marked recommended; Microsoft requires IEDriverServer 4.0.0.0 or later for IE mode.
- Required Windows settings: The Selenium IE Driver needs Protected Mode set to the same value in every security zone, Enhanced Protected Mode: off, browser zoom: 100%, and Windows display scaling: 100%.
- attachToEdgeChrome: The attachToEdgeChrome flag in InternetExplorerOptions (attach_to_edge_chrome in Python) makes IEDriverServer launch Microsoft Edge and load every page in IE mode instead of the IE 11 desktop app.
- Trident limits: IE mode renders with the IE 11 Trident engine, so modern JavaScript can fail. On the React-based Selenium Playground, typing worked in IE mode but the button never displayed its output.
Can You Run IE Mode Tests Without a Windows Machine?
Yes. TestMu AI runs IE mode sessions on Windows 11 in the cloud when a RemoteWebDriver requests browserName internet explorer and browserVersion 11.0, so macOS and Linux teams need no local Windows setup.
What Is Selenium IE Driver?
The Selenium IE Driver, IEDriverServer.exe, is a standalone server that implements the WebDriver protocol and turns Selenium commands into actions inside Internet Explorer's engine. The selenium.dev IE Driver Server documentation says it has been tested with IE 11 on Windows 10, and that older IE or Windows versions might work but are not supported.
Your script talks to IEDriverServer, which drives either the IE 11 desktop app or, with one option set, Microsoft Edge in IE mode. In the cloud run later in this article, the IE mode session reported document.documentMode 11 and a Trident/7.0 user agent, the same engine legacy IE users get.
IE 11 Retirement and IE Mode
Microsoft describes IE mode as the Edge feature for organizations that still need IE 11 for legacy websites or apps. The page under test loads inside an Edge window, but it renders and runs scripts the way IE 11 did. For the business case on whether to test IE at all, see whether browser testing on Internet Explorer still makes sense.
| What you test | Driver | What to set |
|---|---|---|
| Legacy page in IE mode | IEDriverServer 4.0.0.0 or later | attachToEdgeChrome plus the Edge executable path |
| IE 11 desktop app | IEDriverServer | Nothing extra; only on machines where IE 11 still runs |
| Same page in modern Edge | msedgedriver | EdgeOptions; Selenium Manager can download the driver |
How to Set Up IEDriverServer
Download IEDriverServer from the selenium.dev downloads page, which lists version 4.14.0 for 32-bit and 64-bit Windows. Unzip IEDriverServer.exe into a folder on your PATH. If it is not on PATH, set the webdriver.ie.driver system property in Java or pass the path through the driver's Service object.
Required Windows Settings
The selenium.dev documentation lists these settings as required, and Microsoft's IE mode guide points back to the same list:
- Protected Mode - set the same value, on or off, for Internet, Local intranet, Trusted sites and Restricted sites under Tools, Internet Options, Security. A mismatch is the usual cause of NoSuchWindowException.
- Enhanced Protected Mode - disable it on IE 10 and later.
- Browser zoom - keep it at 100% so native mouse events land on the right coordinates.
- Display scaling - on Windows 10, set "Change the size of text, apps, and other items" to 100%.
- FEATURE_BFCACHE registry key - for IE 11 only, add a DWORD named iexplore.exe with value 0 under the key below, creating FEATURE_BFCACHE if it is missing.
| Windows installation | Registry key |
|---|---|
| 32-bit Windows | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE |
| 64-bit Windows | HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE |
32-bit vs 64-bit Driver
Use the 32-bit build, which the selenium.dev downloads page marks as recommended, even on 64-bit Windows. When this article was first written, the 64-bit driver typed into text fields very slowly on a 64-bit Windows machine, and switching to the 32-bit IEDriverServer brought sendKeys back to normal speed.
How to Run Selenium Tests in IE Mode
Each script below opens the Simple Form Demo on the Selenium Playground, types a message, and prints the field value and document.documentMode. A documentMode of 11 confirms the page is running in IE mode, not in Edge's Chromium engine. Run them on Windows with Microsoft Edge installed, after the settings above.
Python
Set attach_to_edge_chrome and edge_executable_path on IeOptions, then start webdriver.Ie with those options. If you run Python tests with pytest, the Selenium pytest tutorial shows how to move this into a fixture.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
options = webdriver.IeOptions()
options.attach_to_edge_chrome = True
options.edge_executable_path = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
driver = webdriver.Ie(options=options)
try:
driver.get("https://www.testmuai.com/selenium-playground/simple-form-demo/")
field = WebDriverWait(driver, 20).until(
EC.presence_of_element_located((By.ID, "user-message"))
)
field.send_keys("Typed in IE mode")
print("input value =", field.get_property("value"))
print("documentMode =", driver.execute_script("return document.documentMode"))
finally:
driver.quit()
Java
In Java, attachToEdgeChrome() and withEdgeExecutablePath() are methods on InternetExplorerOptions.
import java.time.Duration;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class IeModeTest {
public static void main(String[] args) {
InternetExplorerOptions options = new InternetExplorerOptions();
options.attachToEdgeChrome();
options.withEdgeExecutablePath("C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe");
WebDriver driver = new InternetExplorerDriver(options);
try {
driver.get("https://www.testmuai.com/selenium-playground/simple-form-demo/");
WebElement field = new WebDriverWait(driver, Duration.ofSeconds(20))
.until(ExpectedConditions.presenceOfElementLocated(By.id("user-message")));
field.sendKeys("Typed in IE mode");
System.out.println("input value = " + field.getDomProperty("value"));
System.out.println("documentMode = "
+ ((JavascriptExecutor) driver).executeScript("return document.documentMode"));
} finally {
driver.quit();
}
}
}
C#
In C#, AttachToEdgeChrome and EdgeExecutablePath are properties. Leave IntroduceInstabilityByIgnoringProtectedModeSettings off and fix the Protected Mode zones instead, since that flag hides the misconfiguration rather than removing it.
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Support.UI;
class IeModeTest
{
static void Main()
{
var options = new InternetExplorerOptions
{
AttachToEdgeChrome = true,
EdgeExecutablePath = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
};
using var driver = new InternetExplorerDriver(options);
driver.Navigate().GoToUrl("https://www.testmuai.com/selenium-playground/simple-form-demo/");
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
var field = wait.Until(d => d.FindElement(By.Id("user-message")));
field.SendKeys("Typed in IE mode");
Console.WriteLine("input value = " + field.GetDomProperty("value"));
Console.WriteLine("documentMode = "
+ ((IJavaScriptExecutor)driver).ExecuteScript("return document.documentMode"));
}
}
For PHP, the guide to opening IE and Edge in Selenium with PHP covers php-webdriver setup.
IE Mode Limitations and Fixes
Microsoft's IE mode guide lists two behaviors that worked with the IE 11 app but need workarounds in Edge:
- New windows - after window.open or the New Window command, IEDriverServer may not see the new window right away. Poll the window handles until the count grows.
- Inactive tabs - tabs that lose focus can drop out of the window handle list. Store a tab's handle before you switch away if you need to come back to it.
- Trident engine - TestMu AI's IE mode documentation notes that shadow DOM, modern CSS selectors and some JavaScript APIs are unavailable, and recommends explicit waits.
initial_count = len(driver.window_handles)
driver.find_element(By.ID, "open-new-window").click()
WebDriverWait(driver, 10).until(lambda d: len(d.window_handles) > initial_count)
The Trident limit showed up in our own test run. On the React-based Simple Form Demo, IE mode accepted the typed message, but clicking Get Checked Value never filled the Your Message panel, because the page's JavaScript does not run in IE 11's engine. The same type-and-click flow passed on regular Edge for Windows 11 in the same build, so test the IE-only pages your users actually open in IE mode, not your modern front end.

Note: Need IE mode coverage without maintaining a Windows machine? Run IE mode, Edge and 3,000+ other browser and OS combinations on TestMu AI. Start testing free
How to Run IE Mode Tests on a Cloud Grid
TestMu AI's Automation Cloud runs Selenium tests on 3,000+ browser and OS combinations, Internet Explorer included, and records network logs, console logs, video and screenshots for every session. For IE mode you request browserVersion 11.0 on Windows 11, and the platform attaches Edge on its side, so the script needs no Edge path.
const { Builder, By, until } = require('selenium-webdriver');
(async () => {
const caps = {
browserName: 'internet explorer',
browserVersion: '11.0',
platformName: 'Windows 11',
'LT:Options': {
username: process.env.LT_USERNAME,
accessKey: process.env.LT_ACCESS_KEY,
build: 'Selenium Edge and IE Mode Blog',
name: 'IE mode - Simple Form Demo',
w3c: true
}
};
const driver = await new Builder()
.usingServer('https://hub.lambdatest.com/wd/hub')
.withCapabilities(caps)
.build();
try {
await driver.get('https://www.testmuai.com/selenium-playground/simple-form-demo/');
console.log('document.documentMode =', await driver.executeScript('return document.documentMode'));
console.log('userAgent =', await driver.executeScript('return navigator.userAgent'));
const input = await driver.wait(until.elementLocated(By.id('user-message')), 20000);
await input.sendKeys('Typed in IE mode');
console.log('input value =', await input.getAttribute('value'));
} finally {
await driver.quit();
}
})();
This is the output from our run of that script on TestMu AI (session a1463c73-2bb8-44f3-8c0b-8f44710141c5, 17.2 seconds):
document.documentMode = 11
userAgent = Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko
input value = Typed in IE mode
The Trident/7.0 user agent and documentMode 11 confirm the session ran in IE mode. IE mode sessions take longer to start than Chromium sessions, so raise the session timeout in LT:Options if startup times out.
Conclusion
Start with one IE-only page your users still open: run the Python script above against it with the 32-bit IEDriverServer and the required Windows settings, and confirm documentMode reports 11. Then move the same test to the cloud using TestMu AI's IE mode on Edge documentation, so it runs in CI next to your Chrome and Edge suites.
Author
Himanshu Sheth is the Director of Marketing (Technical Content) at TestMu AI, with over 8 years of hands-on experience in Selenium, Cypress, and other test automation frameworks. He has authored more than 130 technical blogs for TestMu AI, covering software testing, automation strategy, and CI/CD. At TestMu AI, he leads the technical content efforts across blogs, YouTube, and social media, while closely collaborating with contributors to enhance content quality and product feedback loops. He has done his graduation with a B.E. in Computer Engineering from Mumbai University. Before TestMu AI, Himanshu led engineering teams in embedded software domains at companies like Samsung Research, Motorola, and NXP Semiconductors. He is a core member of DZone and has been a speaker at several unconferences focused on technical writing and software quality.
Reviewer
Navin Chandra is a Member of Technical Staff at TestMu AI, building the open-source automation that powers its Selenium and Appium cloud grid. A committer to both Selenium and Appium, he implemented WebDriver BiDi support in Selenium for real-time browser events and bidirectional control and is developing Apple's iOS RemoteXPC protocol in Appium to enable low-level wireless communication with iOS system services. He contributes to Selenium across multiple language bindings as a member of the Selenium GitHub organization. He has served as a Google Summer of Code mentee and mentor at openSUSE and an LFX mentee at CNCF's KubeArmor, and is a SUSE Certified Deployment Specialist. Navin holds a B.Tech in Computer Science.
Selenium IE Driver FAQs
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance
- Advanced access controls
- Advanced data retention rules
- Advanced Local Testing
- Premium Support options
- Early access to beta features
- Private Slack Channel
- Unlimited Manual Accessibility DevTools Tests







