I have downloaded the Selenium server 3.0.0 into my C:\SeleniumGrid\ folder and setup the hub and node using separate command consoles. I've included the logs below. When running my automation scenario on my machine (same machine as the selenium grid) I get the following run-time error.
Any help appreciated.
Hub console
C:\SeleniumGrid>java -jar selenium-server-standalone-3.0.0.jar -role hub -port 666
14:46:32.026 INFO - Selenium build info: version: '3.0.0', revision: '350cf60'
14:46:32.026 INFO - Launching Selenium Grid hub
2017-08-07 14:46:32.459:INFO::main: Logging initialized @627ms
14:46:32.466 INFO - Will listen on 666
2017-08-07 14:46:32.494:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2017-08-07 14:46:32.513:INFO:osjsh.ContextHandler:main: Started
o.s.j.s.ServletContextHandler@1baf4f0{/,null,AVAILABLE}
2017-08-07 14:46:32.523:INFO:osjs.ServerConnector:main: Started ServerConnector@ 1606c0b{HTTP/1.1}{0.0.0.0:666}
2017-08-07 14:46:32.523:INFO:osjs.Server:main: Started @692ms
14:46:32.524 INFO - Nodes should register to http://10.6.122.48:666/grid/register/
14:46:32.524 INFO - Selenium Grid hub is up and running
14:49:56.259 INFO - Registered a node http://10.6.122.48:5555
Launching a new console window I run the following
Node console
c:\SeleniumGrid>java -jar selenium-server-standalone-3.0.0.jar -role node -hub http://localhost:666/grid/register
14:56:02.397 INFO - Selenium build info: version: '3.0.0', revision: '350cf60'
14:56:02.398 INFO - Launching a Selenium Grid node
2017-08-07 14:56:02.665:INFO::main: Logging initialized @426ms
14:56:02.706 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:56:02.707 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
14:56:02.707 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:56:02.707 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:56:02.711 INFO - Driver provider org.openqa.selenium.safari.SafariDriverregistration is skipped:registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN8_1
2017-08-07 14:56:02.732:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2017-08-07 14:56:02.747:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@1ef2d72{/,null,AVAILABLE}
2017-08-07 14:56:02.757:INFO:osjs.ServerConnector:main: Started ServerConnector@4b8173{HTTP/1.1}{0.0.0.0:5555}
2017-08-07 14:56:02.757:INFO:osjs.Server:main: Started @518ms
14:56:02.758 INFO - Selenium Grid node is up and ready to register to the hub
14:56:02.762 INFO - Starting auto registration thread. Will try to register every 5000 ms.
14:56:02.762 INFO - Registering the node to the hub: http://localhost:666/grid/register
14:56:02.776 INFO - The node is registered to the hub and ready to use
C# code sample, using the remote Web Driver
public class WebDriverFactory : IWebDriverFactory
{
public IWebDriver Get()
{
var cap = DesiredCapabilities.Chrome();
cap.Platform = new Platform(PlatformType.Vista);
var driver = new RemoteWebDriver(new Uri("http://10.6.122.48:5555/wd/hub"), cap);
return driver;
}
}
Screen shot of the run-time C# error
Updates
- The hub/ node and automation tests are currently all on the same machine.
- I can open up a browser and see the Selenium page here http://10.6.122.48:5555
- Changed C# to use the following: new RemoteWebDriver(new Uri("http://10.6.122.48:666/wd/hub"), cap) Received following error message after applying this change
Error message:
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.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at ... in D:\Projects\UAT Automation\... 15
at ..ctor() in D:\...cs:line 33
at ..ctor() in D:\...cs:line 21