I serve the JavaScript community, so I try to run nightwatchjs locally without introducing Java myself. I am sure that if you start the remote Selenium Server, that remote instance must have a Java server on which the command is sent to the remote browser. For example: ChromeDriver.
However, I got the impression that you can connect a standard standard client to a standard WebDriver (ChromeDriver) locally without to create a selenium-server-standalone-2.xx.0.jar Java server. Since nightwatchJS is the first client I tried, it was very difficult to find a configuration where this would work, as all documentation indicates what says
He, what can I say: if you want nightwatch to start (and stop) the server for you during the tests ("start_process": true), it seems that this is necessary to start the Java server.
However, due to the large number of samples, if you want to run ChromeDriver yourself on the command line, thereby constantly working with it, I can run ChromeDriver without the standalone Java Selenium. CAVEAT: So far, only on OS X ... So, if ChromeDriver is in your PATH:
% chromedriver --url-base=/wd/hub Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 9515 Only local connections are allowed.
Now take this port (9515) and update your nightwatch.json to dictate that you want to use Chrome. I set the default value, but you can set up a Chrome-specific environment. Remove the "selenium" block from your nightwatch.json and now tell Nightwatch where it can find the running server. And what type of serving browser:
"test_settings": { "default": { "launch_url": "http://localhost:8888/", "selenium_host": "127.0.0.1", "selenium_port": "9515", "silent": true, "firefox_profile": false, "screenshots": { "enabled": false, "path": "" }, "desiredCapabilities": { "browserName": "chrome", "javascriptEnabled": true, "acceptSslCerts": true, "__commentOut: chromeOptions" : { "args" : ["start-fullscreen"] } }, } }
Using this method works for me; I can run nightwatch to control Chrome without a standalone Java Selenium server. Again, this is on OS X using ChromeDriver, which always works. I can't figure out how to get Nightwatch to control the start / stop of ChromeDriver without adding a separate Java Selenium server to the mix.