Lucie Lavickova
Lucie Lavickova

Reputation: 11

Selenium WebDriver does not kill iexplore processes after finishing tests

I use Selenium WebDriver automated tests written in C# .NET and NUnit framework running in Internet Explorer 8 on a build server using Teamcity.

First problem is that it starts IEDriverServer and then Internet Explorer browser processes, but I cannot see them - they are somehow hidden. In Task Manager I can see them at Processes tab, but not at Applications tab. However, when I run the same code on my localhost, it is normally visible and I can see what is happening in the tests.

Second problem, that is probably related to the first one, is that it does not close iexplore processes after finishing test and therefore they stay there and after some time it get stucked and test fails with this error message:

SetUp method failed. SetUp : System.InvalidOperationException : Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070490 ('Element not found.') for URL 'http://localhost:64352/' (NoSuchDriver)
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) 

The only solution I found is to kill all iexplore processes after finishing test, but there must be some reason for this behaviour. And I would also like to see the Internet Explorer running when the automated tests are performed.

Has someone experienced this problem, too?

Upvotes: 1

Views: 503

Answers (1)

Mayur Shah
Mayur Shah

Reputation: 528

I suspect the reason that, you might be running grid/node as a service. If that's the case, let's say you might have used login XXX to setup service. Now when you are logging in to server to see the status, you might be using login YYY. Hence you can not see the process being executed by some other user.

Hope it helps.

Upvotes: 1

Related Questions