Features

IE mode on Edge browser

Some (older) websites are built to run on Internet Explorer and might have features that are not supported by current browsers, such as Microsoft Edge. Microsoft Edge is the successor of Internet Explorer.

Microsoft Edge provides an Internet Explorer Mode with Microsoft Edge, which allows you to run the Edge browser just like you would be running an IE 11 browser.

IE mode on Microsoft Edge is supported from Selenium version 4 and higher.

Start using Internet Explorer Mode

To run your Selenium 4 tests with IE Mode and Edge, you can use the ie.edgechromium capability with se:ieOptions. Please see the eaxmple below.

Copy code
caps["platform"] = "WINDOWS"
caps["version"] = '11'
caps["browserName"] = "internet explorer"
caps["tb:options"] = { "edgeVersion": "120" } # or don't specify to use the latest Edge version
caps["se:ieOptions"] = {"ie.edgechromium" => "true"}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "Windows");
caps.setCapability("browserName", "internet explorer");
caps.setCapability("version", "11");
InternetExplorerOptions ieOptions = new InternetExplorerOptions();
ieOptions.attachToEdgeChrome();
capabilities.setCapability("se:ieOptions", ieOptions);
HashMap<String, Object> tbOptions = new HashMap<String, Object>();
tbOptions.put("edgeVersion", "120"); // or don't specify to use the latest Edge version
capabilities.setCapability("tb:options", tbOptions);
Copy code
$caps["platform"] = "Windows"
$caps["version"] = '11'
$caps["browserName"] = "internet explorer"
$caps["tb:options"] = { "edgeVersion": "120" } # or don't specify to use the latest Edge version
$caps["se:ieOptions"] = { "ie.edgechromium" => "true" }
Copy code
caps["platform"] = "WINDOWS"
caps["version"] = '11'
caps["browserName"] = "internet explorer"
caps["tb:options"] = { "edgeVersion": "120" } # or don't specify to use the latest Edge version
caps["se:ieOptions"] = {"ie.edgechromium" => "true"}
Copy code
const driver = await new webdriver.Builder().withCapabilities({
    "browserName": 'internet explorer',
    "version": '11',
    "se:ieOptions" : { "ie.edgechromium" : true },
    "tb:options": {
      "edgeVersion": "120" // or don't specify to use the latest Edge version
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();<
Copy code
var ieOptions = new InternetExplorerOptions()
{
    BrowserVersion = "11",
    PlatformName = "Windows 10",
    UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["iedriverVersion"] = "4.8.0",
    ["selenium-version"] = "4.8.0"
};

var seIEOptions = new InternetExplorerOptions();
seIEOptions.AttachToEdgeChrome = true;

ieOptions.AddAdditionalCapability("tb:options", tbOptions, true);
ieOptions.AddAdditionalOption("se:ieOptions", seIEOptions);

driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
    ieOptions.ToCapabilities(), TimeSpan.FromSeconds(600));