Skip to content

[πŸ› Bug]: Could not find an Internet Explorer window when running Edge in IE modeΒ #15378

@rathimayur

Description

@rathimayur

What happened?

Unable to instantiate InternetExplorerDriver instance on on Windows 11.
Getting below Exception on driver instantiation.

Exception:
Unexpected error launching Internet Explorer. Could not find an Internet Explorer window belonging to the process with ID 5216 within 60000 milliseconds. (SessionNotCreated)

How can we reproduce the issue?

Source Code:
var ieOptions = new InternetExplorerOptions
{
    AttachToEdgeChrome = true
};

ieOptions.EnsureCleanSession = true;
ieOptions.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
ieOptions.ElementScrollBehavior = InternetExplorerElementScrollBehavior.Bottom;
ieOptions.EnableNativeEvents = true;
ieOptions.PageLoadStrategy = OpenQA.Selenium.PageLoadStrategy.Default;

ieOptions.BrowserAttachTimeout = TimeSpan.FromMinutes(1);
ieOptions.ImplicitWaitTimeout = TimeSpan.FromMinutes(1);
ieOptions.PageLoadTimeout = TimeSpan.FromMinutes(1);
ieOptions.EdgeExecutablePath = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe";
ieOptions.IgnoreZoomLevel = true;
string driverPAthWithFileName = @"C:\\Users\\mayurrat\\source\\repos\\TestChromeDriver\\bin\\Debug\\net8.0-windows\IEDriverServer.exe";
InternetExplorerDriverService driverService = InternetExplorerDriverService.CreateDefaultService(driverPAthWithFileName);

try
{
    Driver = new InternetExplorerDriver((InternetExplorerDriverService)driverService, ieOptions, TimeSpan.FromSeconds(Convert.ToInt32(600)));
}
catch (Exception ex)
{

}

Relevant log output

Unexpected error launching Internet Explorer. Could not find an Internet Explorer window belonging to the process with ID 5216 within 60000 milliseconds. (SessionNotCreated)
Stack Trace:
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.<ExecuteAsync>d__63.MoveNext()
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerDriverService service, InternetExplorerOptions options, TimeSpan commandTimeout)
   at TestChromeDriver.ChromeDriverSample.button1_Click(Object sender, EventArgs e) in C:\Users\mayurrat\source\repos\TestChromeDriver\ChromeDriverSample.cs:line 131

Operating System

Windows 11

Selenium version

C# 4.29.0

What are the browser(s) and version(s) where you see this issue?

Microsoft Edge Version 133.0.3065.92 (Official build) (64-bit)

What are the browser driver(s) and version(s) where you see this issue?

IEDriverServer 4.14.0.0

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions