Reputation: 125
I'm struggling for hours with Selenium Server 3.8.1 ...
I can't get it running on my PC ...; Firefox opens just a blank page but not www.toolsqa.com ...
Selenium Server 3.8.1 / Win7 64 Bit / Firefox 57.0.4 64 Bit / Geckodriver 0.19.1 64 Bit / Java JDK 1.8 Update 112
I've also played around with FirefoxOptions() but all in vain too.
P.S.: My local Selenium runs perfect.
Do you have a hint for me please?
Thanks a lot in advance.
============================================================
Hub and Node are running with default values:
Hub :
java -jar selenium-server-standalone-3.8.1.jar -role hub
Node :
java -jar selenium-server-standalone-3.8.1.jar -role node -hub http://localhost:4444/grid/register
On the Hub-Screen:
07:17:59.688 INFO - Selenium Grid hub is up and running
07:18:13.884 INFO - Registered a node http://10.0.0.1:5555
On the Node-Screen:
07:18:13.619 INFO - Registering the node to the hub: http://localhost:4444/grid/register
07:18:13.884 INFO - The node is registered to the hub and ready to use
============================================================
Code :
System.setProperty("webdriver.gecko.driver", "e:\\geckodriver.exe");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
capabilities.setBrowserName("firefox");
URL url = new URL("http://localhost:4444/wd/hub");
RemoteWebDriver driver = new RemoteWebDriver(url, capabilities);
driver.get("http://www.toolsqa.com");
============================================================
The output on the Eclipse Console is just this - nothing else:
Jan 13, 2018 9:33:22 AM org.openqa.selenium.remote.DesiredCapabilities firefox
INFORMATION: Using new FirefoxOptions() is preferred to DesiredCapabilities.firefox()
============================================================
Output on the Hub-Screen:
D:\Java\Selenium-Test-Software>java -jar selenium-server-standalone-3.8.1.jar -role hub
09:33:00.087 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
09:33:00.087 INFO - Launching Selenium Grid hub
2018-01-13 09:33:00.991:INFO::main: Logging initialized @1229ms to org.seleniumhq.jetty9.util.log.StdErrLog
09:33:01.007 INFO - Will listen on 4444
2018-01-13 09:33:01.069:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-13 09:33:01.085:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0
2018-01-13 09:33:01.085:INFO:osjs.session:main: No SessionScavenger set, using defaults
2018-01-13 09:33:01.101:INFO:osjs.session:main: Scavenging every 600000ms
2018-01-13 09:33:01.101:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@62e136d3{/,null,AVAILABLE}
2018-01-13 09:33:01.116:INFO:osjs.AbstractConnector:main: Started ServerConnector@5d47c63f{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-01-13 09:33:01.116:INFO:osjs.Server:main: Started @1365ms
09:33:01.116 INFO - Nodes should register to http://10.0.0.1:4444/grid/register/
09:33:01.116 INFO - Selenium Grid hub is up and running
09:33:10.273 INFO - Registered a node http://10.0.0.1:5555
09:33:24.001 INFO - Got a request to create a new session: Capabilities {acceptInsecureCerts: true, browserName: firefox, marionette: true, version: }
09:33:24.017 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, marionette=true, se:CONFIG_UUID=8c1ad163-51a6-4294-967d-66985bc53995, browserName=firefox, maxInstances=5, platform=VISTA}
============================================================
Output on the Node-Screen:
09:33:10.071 INFO - Using new EdgeOptions() is preferred to DesiredCapabilities.edge()
09:33:10.071 INFO - Using new FirefoxOptions() is preferred to DesiredCapabilities.firefox()
09:33:10.071 INFO - Using new OperaOptions() is preferred to DesiredCapabilities.operaBlink()
09:33:10.071 INFO - Using new SafariOptions() is preferred to DesiredCapabilities.safari()
09:33:10.086 INFO - Using the passthrough mode handler
2018-01-13 09:33:10.102:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-13 09:33:10.133:WARN:osjs.SecurityHandler:main: [email protected]@ae13544{/,null,STARTING} has uncovered http methods for path: /
2018-01-13 09:33:10.133:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@ae13544{/,null,AVAILABLE}
2018-01-13 09:33:10.149:INFO:osjs.AbstractConnector:main: Started ServerConnector@3294b8a0{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-01-13 09:33:10.149:INFO:osjs.Server:main: Started @1445ms
09:33:10.149 INFO - Selenium Grid node is up and ready to register to the hub
09:33:10.164 INFO - Starting auto registration thread. Will try to register every 5000 ms.
09:33:10.164 INFO - Registering the node to the hub: http://localhost:4444/grid/register
09:33:10.273 INFO - The node is registered to the hub and ready to use
2018-01-13 09:33:24.033:INFO:osjshC.ROOT:qtp2013559698-14: org.openqa.selenium.remote.server.WebDriverServlet-639c2c1d: Initialising WebDriverServlet
09:33:24.048 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@3288da3c
09:33:24.048 INFO - /session: Executing POST on /session (handler: BeginSession)
09:33:24.142 INFO - Capabilities are: Capabilities {acceptInsecureCerts: true, browserName: firefox, marionette: true, version: }
09:33:24.142 INFO - Capabilities {acceptInsecureCerts: true, browserName: firefox, marionette: true, version: } matched class org.openqa.selenium.remote.server.
ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1515832404376 geckodriver INFO Listening on 127.0.0.1:44674
1515832404688 mozprofile::profile INFO Using profile path C:\Users\Stxxxxx\AppData\Local\Temp\rust_mozprofile.EIKHplrPpffl
1515832404703 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1515832404719 geckodriver::marionette INFO Connecting to Marionette on localhost:58255
Upvotes: 2
Views: 670
Reputation: 125
Thanks a lot Debanjan - it's running now!!!
P.S.: geckodriver.exe has to be prefixed with the path if it is not in the Windows-Search-Path; in my case:
java -Dwebdriver.gecko.driver=e:\geckodriver.exe -jar selenium-server-standalone-3.8.1.jar -role node -hub http://localhost:4444/grid/register
Regards Joe
Upvotes: 0
Reputation: 193178
Well it got easier with the updation of your steps but a detailed error trace log would have been more helpful. The main issue is in the startup
procedure of Selenium Grid Node
. If you want to use GeckoDriver
you have to start the Selenium Grid Node
with the following command :
java -Dwebdriver.gecko.driver=geckodriver.exe -jar selenium-server-standalone-3.8.1.jar -role node -hub http://localhost:4444/grid/register
Upvotes: 1