Skip to content

Using Internet Explorer mode in Microsoft Edge

Some websites, such as legacy applications, make it possible to access their content only through Internet Explorer (IE).

IE mode in Microsoft Edge is a feature for organizations that still need Internet Explorer 11 for backward compatibility for legacy websites or apps.

This guide will describe the steps required to configure and use IE mode in the Edge browser.

IEDriverServer version

The 64-bit version of IEDriverServer has some bugs and limitations, causing some cases not to work as expected.

To avoid these issues, using the 32-bit version is recommended whenever possible.

Setting the Default Options

With the IEDriver downloaded (32-bit version recommended) and the IE browser selected, we were able to use the browser's options to configure the necessary settings.

In this example, we will only use the additional options needed to be able to use IE mode in Edge, but a set of other capabilities is available and can be used as an additional option as needed.

See more details about the available capabilities at this link.

# Import for the Web Bot
from botcity.web import WebBot, Browser
# Importing IE default options
from botcity.web.browsers.ie import default_options

def main():

    bot = WebBot()

    bot.headless = False

    # Configuring to use Internet Explorer
    bot.browser = Browser.IE
    bot.driver_path = "<path to your IEDriverServer.exe>"

    # Setting the necessary additional options to use IE mode
    # Adjust for your Microsoft Edge installation path
    ie_options = default_options()
    ie_options.add_additional_option("ie.edgechromium", True)
    ie_options.add_additional_option("ignoreProtectedModeSettings", True)
    ie_options.add_additional_option("ie.edgepath", "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe")

    bot.options = ie_options

    bot.browse("https://google.com")
    bot.wait(5000)
    ...

Running the code above, you will get a result similar to this:

IE mode in Edge

Issues using 64-bit version

On some systems, using the 64-bit version of IEDriverServer may cause some limitations, causing it not to work as expected.

A common problem that can be caused by using the 64-bit version is slow typing of characters when using Selenium's send_keys method.

If you are encountering issues similar to this one, try using the 32-bit version of IEDriverServer. It is recommended to use this version whenever possible.

Using IE mode on newer operating systems

On Windows 11 or newer versions of system where IE is not installed by default, you may encounter issues when trying to run your automation code.

This can happen because the ignoreProtectedModeSettings flag is telling the driver to ignore registry values, and those values don't even exist by default in Windows 11.

In this case, a possible solution is to define an additional property called initial_browser_url. The code would look like this:

...
ie_options.initial_browser_url = 'https://google.com' # You can set any url
bot.options = ie_options
...

This will probably be enough to resolve the crashing issue when executing the code. See more details at this link.

Info

Internet Explorer has some limitations and may not work properly for some situations.

If you have some problem, see the list of common errors.

If you have any questions about the driver, see IE Driver Server Documentation.