Edge in IE mode is not working with IEDriverServer

Simulator World 0 Reputation points
2023-03-20T08:25:13.7933333+00:00

I was trying to automate Edge in IE mode using selenium IEDriverServer.exe. When the code is executed, the browser window appears on the screen and remains stuck for sometime giving a timeout exception. On debugging the code, this timeout exception is thrown while initilaizing InternetExplorerDriver object.

Automation Approach: 

Using the code sample available on Microsoft website. All the pre-requsites mentioned on Selenium website are met. 

https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ie-mode?tabs=c-sharp

Observation: 

Same code, when executed after adding the application URL in the Trusted Sites, is working.

System Configuration: 

Operating System: Win 11

Edge browser: 111.0.1661.43

IEDriver Version: 4.0.0.0, 4.3.0.0, 4.8.1.0

Please do let me know if anyone is facing same problem and any solution to it.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,128 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yu Zhou-MSFT 12,056 Reputation points Microsoft Vendor
    2023-03-20T08:55:08.0266667+00:00

    Hi @Simulator World

    I saw you asked the same question on StackOverflow. I'll follow up on this site.

    I see that you use InternetExplorerOptions.AddAdditionalCapability so I guess you use Selenium WebDriver 3. Selenium WebDriver 3 is deprecated now, and you need to upgrade to the latest version Selenium WebDriver 4.8.1. Besides, you need to place the IEDriver in your PATH.

    I test with Selenium WebDriver 4.8.1, IEDriver 4.8.1.0, Edge version 111.0.1661.44 on Win 11 with the sample code, it works well. You can have a try.

    Edit:

    You must set the Protected Mode settings for each zone to be the same value to meet the Required Configuration.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,

    Yu Zhou