Does Selenium(IEDriverServer) Web driver supports Windows 2008 server R2

2,468 views
Skip to first unread message

Naresh

unread,
May 31, 2012, 12:25:21 PM5/31/12
to webd...@googlegroups.com

Hello all,

Pleas  me on this. Probably this is my 4th post about the same issue.

I had the same problem with Selenium 2.21.

I thought of giving a try with Selenium 2.22. Getting the same exception there also.


FlexClient.UI.TestPack.Tests.ResetTests.TestEnterResetCode:
SetUp : OpenQA.Selenium.NoSuchWindowException : Window is closed (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds
Build info: version: '2.22.0', revision: '17049', time: '2012-05-29 13:31:45'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_29'
Driver info: driver.version: EventFiringWebDriver
Session ID: 05513de3-73f9-4976-9bfa-1f005b239dd3

Thanks,
Naresh


Jim Evans

unread,
May 31, 2012, 12:44:59 PM5/31/12
to webd...@googlegroups.com
And not to put to fine a point on it, but in each of those posts, all you've provided is a stack trace. You haven't provided any of your code, nor an HTML page or link to a public URL that reproduce the problem. Incidentally, the HTML is far, far more important than your WebDriver code. I find that many people when requesting help neglect this, either because they don't realize how necessary it is or because of a mistaken belief that just because their site runs on an intranet or is proprietary that they can't provide such a page[1].

--Jim

[1] If you can't give access to the site under test, create one from scratch that is similar and share that! As long as it reproduces the problem, it doesn't matter if it's the *actual* site you're having problems with.

Naresh Thandu

unread,
May 31, 2012, 3:26:51 PM5/31/12
to webd...@googlegroups.com
Hello Jim,

Thanks for responding. This is my C# code which is throwing exception.

I am using Selenium along with Nunit for UI test automation.

Tests are executing on a remote machine which is Windows server 2008 R2. And the browser is IE9.

I am trying to open a page and before doing something with the controls on page, trying to wait for page load. For that I am using WaitForPageLoad.
It is working fine with firefox but it is throwing some exception while using IE9.

var testCap = DesiredCapabilities.InternetExplorer();
var ieRemoteDriver = new RemoteWebDriver(new Uri("SERVER URL"), testCap) { Url = "website url" };

            _driver = new Selenium.WebDriverBackedSelenium(ieRemoteDriver, url);

            _driver.UnderlyingWebDriver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 10));

            _driver.Start();
_driver.UnderlyingWebDriver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 10));

_driver.UnderlyingWebDriver.Navigate();
_driver.WaitForPageToLoad("10000");




In the above code, _driver.WaitForPageToLoad is throwing the following exception.

Exception details
System.InvalidOperationException was unhandled
  Message=JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 47 milliseconds
Build info: version: '2.21.0', revision: '16552', time: '2012-04-11 19:08:38'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_29'
Driver info: driver.version: EventFiringWebDriver
  Source=WebDriver
  StackTrace:
       at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 966
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 808
       at OpenQA.Selenium.Remote.RemoteWebDriver.ExecuteScriptInternal(String script, Boolean async, Object[] args) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 1027
       at OpenQA.Selenium.Remote.RemoteWebDriver.ExecuteScript(String script, Object[] args) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 402
       at Selenium.Internal.SeleniumEmulation.WaitForPageToLoad.HandleSeleneseCommand(IWebDriver driver, String locator, String value) in c:\Projects\WebDriver\trunk\dotnet\src\Selenium.WebDriverBackedSelenium\Internal\SeleniumEmulation\WaitForPageToLoad.cs:line 35
       at Selenium.Internal.SeleniumEmulation.SeleneseCommand.Apply(IWebDriver driver, String[] args) in c:\Projects\WebDriver\trunk\dotnet\src\Selenium.WebDriverBackedSelenium\Internal\SeleniumEmulation\SeleneseCommand.cs:line 27
       at Selenium.Internal.CommandTimer.RunCommand() in c:\Projects\WebDriver\trunk\dotnet\src\Selenium.WebDriverBackedSelenium\Internal\CommandTimer.cs:line 74
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Please help me.

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/x_6iUwQyz7AJ.

To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.



--
Regards,
Naresh Thandu,
+91-9916710222

Simon Stewart

unread,
May 31, 2012, 3:40:54 PM5/31/12
to webd...@googlegroups.com
Hi Naresh,

Please retry with Selenium 2.22 and the standalone IEDriverServer.exe.

Simon

Naresh Thandu

unread,
May 31, 2012, 3:51:34 PM5/31/12
to webd...@googlegroups.com
Hello Simon,

Tried it with Selenium 2.22 and IEDriverServer.exe.

But getting the same exception.

One more strange thing is, it is throwing exception as well as page is loading successfully.

Naresh

unread,
Jun 1, 2012, 4:08:13 AM6/1/12
to webd...@googlegroups.com

I am adding a screenshot which may give some idea, where the exception is being thrown.

Please help me on this.

Thanks

>> For more options, visit this group at
>> http://groups.google.com/group/webdriver?hl=en.
>
>
>
>
> --
> Regards,
> Naresh Thandu,
> +91-9916710222
>
> --
> You received this message because you are subscribed to the Google Groups
> "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/webdriver?hl=en.

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

WebDriverStackTrace.png

Jim Evans

unread,
Jun 1, 2012, 8:28:53 AM6/1/12
to webd...@googlegroups.com
It's entirely possible there's a bug in the .NET WebDriverBackedSelenium's WaitForPageToLoad implementation. If there's any way you could avoid using it, that might make your task easier.

Simon Stewart

unread,
Jun 1, 2012, 10:16:49 AM6/1/12
to webd...@googlegroups.com
We recommend waiting for a specific element rather than a general
"wait for page to load". The former is deterministic. The latter is
attempting to solve the Halting Problem.

Simon

On Fri, Jun 1, 2012 at 1:28 PM, Jim Evans <james.h....@gmail.com> wrote:
> It's entirely possible there's a bug in the .NET WebDriverBackedSelenium's WaitForPageToLoad implementation. If there's any way you could avoid using it, that might make your task easier.
>
> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/QSy4y2DAjvEJ.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.

Naresh

unread,
Jun 6, 2012, 5:14:31 AM6/6/12
to webd...@googlegroups.com
Hello Simon,

Can you please advice me on how to wait for a specific element.

I can find only these methods under DefaultSelenium class.

WaitForCondition(string script, string timeout);
WaitForFrameToLoad(string frameAddress, string timeout);
WaitForPageToLoad(string timeout);
WaitForPopUp(string windowID, string timeout);

Thanks,
Naresh

Pavithra

unread,
Jun 6, 2012, 6:15:06 AM6/6/12
to webd...@googlegroups.com
Naresh,
You can make use of below code to wait for the expected condition until the webelement is visible
WebElement element= new WebDriverWait(driver, 60).until(
                    ExpectedConditions.visibilityOfElementLocated(driver.findElement(By.id("value"))))

WebDriverWait also got other methods for checking whether element is clickable, selectable, invisiblity of element etc.

Thanks,
Pavithra

Naresh

unread,
Jun 6, 2012, 6:23:09 AM6/6/12
to webd...@googlegroups.com
Hello Pavithra,

Thanks for your reply.

Actually my code is working fine with Firefox and Chrome on Windows 2008 server R2. It is giving the exception for IE.

But the same code is working fine with Windows 7.

Now my doubt is, does selenium supports windows 2008 server? Or not?

Any how, I will make the suggested changes and see.

Thanks,
Naresh

Pavithra

unread,
Jun 6, 2012, 6:27:08 AM6/6/12
to webd...@googlegroups.com
Naresh,
Sorry I don't think so, I can comment on Windows8.

But as Simon suggested instead of page load wait, you can try waiting for the element as per the above code and see whether it helps.

Naresh

unread,
Jun 6, 2012, 10:46:30 AM6/6/12
to webd...@googlegroups.com
No luck.

This time I am getting different exception 'OpenQA.Selenium.NoSuchWindowException : Window is closed (WARNING: The server did not provide any stacktrace information)'

var  capabilities = DesiredCapabilities.InternetExplorer();
capabilities.SetCapability("ignoreProtectedModeSettings", true);
var client = new Client(ConfigurationManager.AppSettings["TargetClient"]);
var url = client.TargetURL;
            
var ieRemoteDriver = new RemoteWebDriver(new Uri(serverUrl), capabilities) { Url = url };

_driver = new Selenium.WebDriverBackedSelenium(ieRemoteDriver, url);

_driver.UnderlyingWebDriver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 10));

_driver.Start();

I am getting the exception on calling Start.

I am using IE stand along server.

I am starting HUB using batch file with this command.

java -jar selenium-server-standalone-2.22.0.jar -role hub http://10.10.5.45:5555/grid/register

And I am starting IE node using following command

java -Dwebdriver.ie.driver="C:\selenium server\IEDriverServer.exe" -jar selenium-server-standalone-2.22.0.jar -role webdriver -hub http://10.10.5.45:4444/grid/register -maxSession 10 -browser "browserName=internet explorer,platform=WINDOWS",maxInstances=10

I am executing tests on Windows 2008 server R2 box with IE9.

Please advice me this problem.

Thanks,
Naresh

Alok Redkar

unread,
Jun 24, 2014, 9:16:40 AM6/24/14
to webd...@googlegroups.com
The point is that the webdriver object is null. So the delay workaround wouldn't work.
I am using the 2.39 IEDriverServer.exe on WinServer2008 R2. And it does not work; I get this :: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
I am hitting http://www.google.com/ so that is not an issue.

This thread still though remains open. We are not yet clear if IEDriverServer.exe works well on WinServer 2008 R2 or not?
Kindly enlighten on this. And if not then please add support as this is a very common testing platform in enterprises.
Thanks.
Alok~

Krishnan Mahadevan

unread,
Jun 25, 2014, 9:05:33 AM6/25/14
to webdriver
Yes IEDriverServer.exe works perfectly fine on Windows 2008 server 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.

darrell

unread,
Jun 26, 2014, 8:23:07 AM6/26/14
to webd...@googlegroups.com
I think everyone here is asking the wrong question. Whenever I see people asking how to get Selenium working with Windows Server 2008 R2 I wonder why they are trying to make Selenium work on a Windows Server. Just because you claim that it is a very common testing platform does not convince me there should be ANY focus on making Selenium (or any test automation tool for web browsers) work on a SERVER.

If I told you the seats in a dump truck are not very comfortable and getting in and out of a large dump truck is very difficult for elderly couples would you expect dump truck companies to change the way they manufacture dump trucks? What if I told you I want to use a dump truck to chauffeur rich, elderly couples because I sell high end homes. The truth of the situation is that dump trucks where never designed to replace a Mercedes Benz, BMW or other luxury vehicle. Even if I tell you there are a lot of people who want this does not make it correct.

The same thing holds true for Windows Server machines. Microsoft CLEARLY indicates that a web browser on a Server class machine should not be used to surf the Internet. The browser on a Windows Server 2008 R2 is there so you can browser the applications running on the Server. It will display more information about the application if you are accessing it via localhost.

Please read my article http://darrellgrainger.blogspot.com/2013/10/windows-server-and-webdriver.html. It has links to Microsoft articles explaining why you should not be using Windows Server as a workstation.

The bottom line is even if you can get IEDriverServer.exe working on Windows Server 2008 R2, you shouldn't use it for general web browsing.

I have worked at companies which the IT department would provide Server class machines for things like Selenium. My solution there was to install VirtualBox or VirtualPC on the Server and run Windows XP, 7 or 8. If you go to https://modern.ie/en-us you can download virtual images which will run on VirtualBox, VirtualPC, VMware, Parallels, etc. and on Windows, Mac or Linux.

There is no valid reason you should be trying to automate Internet Explorer on a Server class machine.

Krishnan Mahadevan

unread,
Jun 29, 2014, 10:07:31 AM6/29/14
to webdriver
Darrell,

There are valid reasons why one would end up working with a Server OS and trying automation on that.

A classic example is SauceLabs themselves.

Take a look at their disclaimer : https://saucelabs.com/platforms

* For licensing reasons, Sauce Labs uses server editions of Windows which correspond closely to the desktop editions. 
Here are the exact versions used: 
For Windows XP, we use Windows Server 2003 R2.
For Windows 7, we use Windows Server 2008 R2.
For Windows 8, we use Windows Server 2012.
For Windows 8.1, we use Windows Server 2012 R2.

In my company we have been successfully running automation [ our Grid runs on Windows 2008 Server boxes ] without any of the hiccups.

So I don't think its a general recommendation that "For automation DONOT use Server OS". The recommendation should be "If you are using a server OS for browser automation, make sure you have configured your environment to add relaxations in all rules as required".






Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.

darrell

unread,
Jul 1, 2014, 1:33:02 AM7/1/14
to webd...@googlegroups.com
First, I am assuming that people here are not using Selenium as a service provider. The fact that SauceLabs is providing Windows computers as a service to clients requires them to use Windows Server machines. For example, if you wanted to create an EC2 instance of a Windows machine on Amazon's AWS you are going to get a  Windows Server and not a Windows 7 or 8 instance. This is because Amazon is providing the machine instances as a service.

However, if I am setting up a Selenium Grid there is no reason I cannot create Windows 7 images. The quantity licenses I might obtain for Windows 7 from Microsoft would allow me to create instances for my company's use. As a consultant working for a client, if I wanted to set up a Selenium Grid on my company's network and allow my client to use it, I would have to use Windows Server machines. If however a client paid me to setup a Selenium Grid using their machines, network and Windows images I would be able to use Windows 7 images (assuming they have licenses for Windows 7). This is because they own the licenses for Windows 7 and I am merely setting up their equipment; I am not providing them Windows as a service.

Can you set up a Windows Server to have relaxed settings for IE and use it as you would IE on Windows 7 or 8? Sure. I don't believe I said NEVER do this. I have said you SHOULD NOT do this. You said that SauceLabs is an example of someone using Windows Server machines rather than Windows workstations. SauceLabs cannot provide workstations. The licensing requires them to use Windows Server machines. I should also point out the support FAQ at http://support.saucelabs.com/entries/23727676-What-browsers-and-OSes-are-available-in-Sauce-. The answer to the first question has:

We configure these to be as close as possible to the latest version of the desktop OS, and have never seen an issue caused by the slight differences. If you do notice unexpected behavior, feel free to reach out to us at he...@saucelabs.com - we've seen a lot of edge cases, and can likely resolve yours with a few quick questions.

This implies that things might not be 100% the same if you are using servers rather than workstations. Will SauceLabs take the time to make sure IE on Windows Server is 99.9% the same as running IE on a workstation? They have to or they wouldn't be able to stay in business. If you don't HAVE to use Windows Server than I question whether it is easier to setup Windows workstations or is it worth making IE on Windows Server behave close to IE on a workstation.

Maybe the statement should be, "If you MUST use Windows Server for browser automation, make sure you have configured your environment to reverse settings described in http://msdn.microsoft.com/en-us/library/ms537180.aspx."
Reply all
Reply to author
Forward
0 new messages