0

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 throwing a timeout exception.

On debugging the code, this timeout exception is thrown while initializing the InternetExplorerDriver object.

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

Automation Approach

Using the code sample available on Microsoft website. All the pre-requisites 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

Code Sample

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

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.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22