-2

I am using VS2017 on a Win10 (17134.471) machine and I just installed Selenium. I can get Chrome, Firefox, Edge to work but not IE11 (11.471.171340). I believe that I have done all the other suggested updates but continue to get:

There are no more files.

It is not clear as to what needs to be installed I installed using NuGet and the versions are:

  1. Selenium.WebDriver v3.141.0 (14 updates since 3.6.0.0)
  2. Selenium.WebDriver64 v3.11.0.1
  3. Selenium.Webdriver.MicrosoftDriver v17.17134.0

    Test Name: IeMethod Test FullName: utLearn2018.FirstTestClass.IeMethod Test Source: C:\Users\stephan\Documents\Visual Studio 2017\Projects\utLearn2018\utLearn2018\FirstTestClass.cs : line 44 Test Outcome: Failed Test Duration: 0:00:22.3336919

Result StackTrace:

at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerDriverService service, InternetExplorerOptions options)
   at OpenQA.Selenium.IE.InternetExplorerDriver..ctor()
   at utLearn2018.FirstTestClass.IeMethod() in C:\Users\stephan\Documents\Visual Studio 2017\Projects\utLearn2018\utLearn2018\FirstTestClass.cs:line 53

Result Message:

Test method utLearn2018.FirstTestClass.IeMethod threw exception: 
System.InvalidOperationException: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.') for URL 'http://localhost:50326/' (SessionNotCreated)

My code is as follows:

using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Edge;
using OpenQA.Selenium.IE;

[TestMethod]
            public void IeMethod()
            {
                InternetExplorerOptions options = new InternetExplorerOptions
                {
                    IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                    EnableNativeEvents = false,
                    EnsureCleanSession = true
                };

                IWebDriver driver = new InternetExplorerDriver();

                driver.Navigate().GoToUrl("http://www.google.com");
                driver.Manage().Window.Maximize();
                driver.Close();
                driver.Quit();
            }
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
StephanM
  • 733
  • 3
  • 22
  • 36
  • Possible duplicate of [IELaunchURL() returned HRESULT 80070012 ('There are no more files.')](https://stackoverflow.com/questions/46647277/ielaunchurl-returned-hresult-80070012-there-are-no-more-files) – JeffC Dec 17 '18 at 19:01
  • As you can see I tried that, but still not working. Also there are 14 releases for the Selenium.WebDriver since 3.60 and I would guess it would be working by now. Or installing properly. – StephanM Dec 17 '18 at 19:19
  • With Selenium.WebDriver 3.6.0 and Webdriver.IEDriverServer.win64 v3.51 I still get the same error: OpenQA.Selenium.WebDriverException: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.') for URL 'http://localhost:6934/' – StephanM Dec 17 '18 at 19:45

1 Answers1

0

Some version of IE driver and selenium webdriver are not compatible. Worth trying different versions of IE driver and Selenium webdriver in order to launch the IE browser.

dansek
  • 129
  • 1
  • 5
  • So there are 4 drivers with the following possibilities 5*7*8*14, Is there a driver that is not involved Selenium.WebDriver. Selenium.WebDriver,IEDriver64, Selenium.WebDriver.MicrosoftDriver, or WebDriverServer.win64? – StephanM Dec 17 '18 at 23:32
  • For me it works IEDriverServer-3.8.32x.exe and Sleenium webdriver 3.8.1 version. – dansek Dec 18 '18 at 07:39