Reputation: 1778
I am getting this. Error and not understanding the missing part.
Installed the chrome on the nod and the chromedriver https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver
Testing with Chrome Driver
Message: Test method SeleniumGridSmokeTest.UnitTest1.TestMethod1 threw exception: System.InvalidOperationException: Unable to create new service: ChromeDriverService Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z' System info: host: 'seleniumnode', ip: '10.0.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-97-generic', java.version: '1.8.0_151' Driver info: driver.version: unknown (InsecureCertificate)
Testing with Firefox Driver
[5:18] Message: Test method SeleniumGridSmokeTest.UnitTest1.TestMethod1 threw exception: System.InvalidOperationException: Unable to create new service: GeckoDriverService Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z' System info: host: 'seleniumnode', ip: '10.0.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-97-generic', java.version: '1.8.0_151' Driver info: driver.version: unknown (InsecureCertificate)
These are the steps I have done to create selenium remote server.
A.I have created an 2 ubuntu boxes in the google cloud. **
B.Installed java onto both machines ( Checked java versions ) http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/
C.Downloaded Selenium-server-standalone-3.6.0.jar wget "http://selenium-release.storage.googleapis.com/3.6/selenium-server-standalone-3.6.0.jar" D.Run the hub command java -jar Selenium-server-standalone-3.6.0.jar -role hub
E.Run the node command
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.6.0.jar -role node -hub http://xxxxxx:4444/grid/register
D.Saw the screens for the console
Configuration Information
browserTimeout: 0 debug: false help: false port: 5555 role: node timeout: 1800 enablePassThrough: true cleanUpCycle: 5000 host: 10.0.0.9 maxSession: 5 capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5, platform=LINUX}] capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5, platform=LINUX}] capabilities: Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1, platform=LINUX}] downPollingLimit: 2 hub: http://51.141.24.51:4444/grid/register id: http://10.0.0.9:5555 hubHost: 51.141.24.51 hubPort: 4444 nodePolling: 5000 nodeStatusCheckTimeout: 5000 proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy register: true registerCycle: 5000 remoteHost: http://10.0.0.9:5555 unregisterIfStillDownAfter: 60000
These are the packages in my application
HUB LOG
2017-11-01 17:00:17.120:INFO:osjs.Server:main: Started @985ms 17:00:17.121 INFO - Nodes should register to http://10.0.0.8:4444/grid/register/ 17:00:17.121 INFO - Selenium Grid hub is up and running 17:08:48.736 INFO - Registered a node http://10.0.0.9:5555 17:15:14.628 INFO - Got a request to create a new session: Capabilities [{browserName=chrome, platformName=ANY, version=, platform=ANY}] 17:15:14.628 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5, platform=LINUX} 17:17:47.972 INFO - Got a request to create a new session: Capabilities [{acceptInsecureCerts=true, browserName=firefox}] 17:17:47.973 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5, platform=LINUX} 17:18:15.651 INFO - Got a request to create a new session: Capabilities [{acceptInsecureCerts=true, browserName=firefox}] 17:18:15.651 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5, platform=LINUX}
NODE LOG
17:17:48.015 INFO - Capabilities {acceptInsecureCerts=true, browserName=firefox, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService) 17:17:48.015 INFO - Capabilities {acceptInsecureCerts=true, browserName=firefox, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) 17:18:15.649 INFO - Binding default provider to: org.openqa.selenium.chrome.ChromeDriverService 17:18:15.650 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@77bf54a0 17:18:15.650 INFO - /session: Executing POST on /session (handler: BeginSession) 17:18:15.651 INFO - Capabilities are: Capabilities {acceptInsecureCerts=true, browserName=firefox, } 17:18:15.651 INFO - Capabilities {acceptInsecureCerts=true, browserName=firefox, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService) 17:18:15.652 INFO - Capabilities {acceptInsecureCerts=true, browserName=firefox, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
19:50:39.179 INFO - Selenium build info: version: '3.6.0', revision: '6fbf3ec767' 19:50:39.179 INFO - Launching a Selenium Grid node 2017-11-01 19:50:39.577:INFO::main: Logging initialized @627ms to org.seleniumhq.jetty9.util.log.StdErrLog 19:50:39.633 INFO - Driver class not found: com.opera.core.systems.OperaDriver 19:50:39.654 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX 19:50:39.654 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped: registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX 19:50:39.655 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped: registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX 19:50:39.673 INFO - Using the passthrough mode handler 2017-11-01 19:50:39.693:INFO:osjs.Server:main: jetty-9.4.5.v20170502 2017-11-01 19:50:39.713:WARN:osjs.SecurityHandler:main: [email protected]@595b007d{/,null,STARTING} has uncovered http methods for path: / 2017-11-01 19:50:39.722:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@595b007d{/,null,AVAILABLE}
AFTER STARTING THE HUB
xxx@seleniumhub:~$ java -jar selenium-server-standalone-3.6.0.jar -role hub 18:19:41.659 INFO - Selenium build info: version: '3.6.0', revision: '6fbf3ec767' 18:19:41.660 INFO - Launching Selenium Grid hub 2017-11-01 18:19:42.217:INFO::main: Logging initialized @772ms to org.seleniumhq.jetty9.util.log.StdErrLog 18:19:42.230 INFO - Will listen on 4444 2017-11-01 18:19:42.277:INFO:osjs.Server:main: jetty-9.4.5.v20170502 2017-11-01 18:19:42.313:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0 2017-11-01 18:19:42.313:INFO:osjs.session:main: No SessionScavenger set, using defaults 2017-11-01 18:19:42.315:INFO:osjs.session:main: Scavenging every 600000ms 2017-11-01 18:19:42.323:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@1ad282e0{/,null,AVAILABLE} 2017-11-01 18:19:42.354:INFO:osjs.AbstractConnector:main: Started ServerConnector@1efee8e7{HTTP/1.1,[http/1.1]}{0.0.0.0:4444} 2017-11-01 18:19:42.355:INFO:osjs.Server:main: Started @910ms 18:19:42.356 INFO - Nodes should register to http://10.0.0.8:4444/grid/register/ 18:19:42.356 INFO - Selenium Grid hub is up and running
Upvotes: 0
Views: 2912
Reputation: 193058
In your code you have used Google Chrome
as a browser which is initialized by chromedriver.exe
.
Hence while starting the Selenium Grid Node
we have to add the argument for chromedriver.exe
as follows :
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.6.0.jar -role node -hub http://localhost:4444/grid/register
Upvotes: -1