Meta -
OS: Ubuntu 16.04.2 LTS
Selenium Version: 3.4
Browser: Internet Explorer
Browser Version: Any
java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
Expected Behavior -
Message: System.InvalidOperationException : Error forwarding the new session cannot find : Capabilities [{browserName=internet explorer, javascriptEnabled=true, version=, platform=WINDOWS}]
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
Actual Behavior -
Message: System.InvalidOperationException : The best matching driver provider org.openqa.selenium.chrome.ChromeDriver can't create a new driver instance for Capabilities [{browserName=internet explorer, version=, platform=WINDOWS}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'asburyselenium-virtual-machine', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-31-generic', java.version: '1.8.0_121'
Driver info: driver.version: unknown
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
Steps to reproduce -
We are running selenium-server-standalone-3.4.0.jar in hub mode, with the jar just downloaded fresh. To demonstrate this bug, I'm not running any nodes at all, but it happens if I have one or more nodes running. But the error will only occur when it round-robins to the Linux server to try to run the IE on Windows test.
java -jar selenium-server-standalone-3.4.0.jar -role hub
This shows:
DefaultRemoteProxy (version : 3.0.1)
id : http://10.64.1.58:5555, OS : mixed OS
BrowsersConfiguration
browserTimeout: 0
debug: false
help: false
port: 5555
role: node
timeout: 1800
cleanUpCycle: 5000
host: 10.64.1.58
maxSession: 1
capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5, platform=LINUX}]
capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5, platform=LINUX}]
capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1, platform=WINDOWS}]
downPollingLimit: 2
hub: http://192.168.25.80:4444/grid/register
id: http://10.64.1.58:5555
hubHost: 192.168.25.80
hubPort: 4444
nodePolling: 5000
nodeStatusCheckTimeout: 5000
proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
register: true
registerCycle: 5000
remoteHost: http://10.64.1.58:5555
unregisterIfStillDownAfter: 60000
First, I'm surprised that it says that it is a MixedOS, since it is linux. Second, I'm surprised that the hub is advertising browser capabilities at all, since it is a hub only (although perhaps I don't understand DefaultRemoteProxy well enough!).
Since the hub is reporting IE on Windows capabilities, it means that every other request I make for a IE on Windows RemoteWebDriver fails. (Others have seen this problem as well.)
Sample Code:
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.IE;
using System;
namespace CRMWebFormTesting {
public class UnitTest1 {
protected IWebDriver Driver;
private static Uri remoteWebDriverUri = new Uri("http://192.168.25.80:4444/wd/hub");
[Test]
public void TestMethod1() {
Driver.Navigate().GoToUrl("http://www.google.com");
try {
WebDriverWait wait = new WebDriverWait(Driver, System.TimeSpan.
FromSeconds(30));
wait.Until(ExpectedConditions.ElementIsVisible(By.Id("hplogo")));
Console.WriteLine("Found element.");
} catch (OpenQA.Selenium.WebDriverTimeoutException) {
Console.WriteLine("Could not find element.");
}
}
[SetUp]
protected void SetUp() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities = DesiredCapabilities.InternetExplorer();
//capabilities = DesiredCapabilities.Chrome();
capabilities.SetCapability(CapabilityType.Platform, new Platform(PlatformType.Windows));
Driver = new RemoteWebDriver(remoteWebDriverUri, capabilities, TimeSpan.FromSeconds(30));
}
[TearDown]
protected void TearDown() {
Driver.Quit();
}
}
}
Meta -
OS: Ubuntu 16.04.2 LTS
Selenium Version: 3.4
Browser: Internet Explorer
Browser Version: Any
java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
Expected Behavior -
Message: System.InvalidOperationException : Error forwarding the new session cannot find : Capabilities [{browserName=internet explorer, javascriptEnabled=true, version=, platform=WINDOWS}]
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
Actual Behavior -
Message: System.InvalidOperationException : The best matching driver provider org.openqa.selenium.chrome.ChromeDriver can't create a new driver instance for Capabilities [{browserName=internet explorer, version=, platform=WINDOWS}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'asburyselenium-virtual-machine', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-31-generic', java.version: '1.8.0_121'
Driver info: driver.version: unknown
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
Steps to reproduce -
We are running selenium-server-standalone-3.4.0.jar in hub mode, with the jar just downloaded fresh. To demonstrate this bug, I'm not running any nodes at all, but it happens if I have one or more nodes running. But the error will only occur when it round-robins to the Linux server to try to run the IE on Windows test.
java -jar selenium-server-standalone-3.4.0.jar -role hubThis shows:
First, I'm surprised that it says that it is a MixedOS, since it is linux. Second, I'm surprised that the hub is advertising browser capabilities at all, since it is a hub only (although perhaps I don't understand DefaultRemoteProxy well enough!).
Since the hub is reporting IE on Windows capabilities, it means that every other request I make for a IE on Windows RemoteWebDriver fails. (Others have seen this problem as well.)
Sample Code: