Home Ask Login Register

Developers Planet

Your answer is one click away!

Željko Filipin February 2016

Nightwatch.js without Java

Is it possible to use Nightwatch.js without installing Java? There are official Selenium JavaScript bindings (WebDriverJS, selenium-webdriver). Is there a reason Java is required?


Nate Stone February 2016

Well Nightwatch.js runs it's tests against the Selenium server. The Selenium server is a Java-Servlet.

So to use Nightwatch.js you just "indirectly" need Java (it's not needed for Nightwatch.js, but for Selenium).

However you are able to use different languages as Selenium Client, since you are able to download different WebDriver Language bindings here


Those WebDrivers/bindings are independent of Nightwatch.js. You can use these WebDrivers/bindings without a Selenium server, if your tests and your browser run on the same machine. In this case you do not need Java, since the WebDriver runs the tests directly against a browser (this is further detailed here)

Nightwatch.js on the other hand definitelly requires java, because it needs the "Selenium-Standalone-Server" which is written in Java. As far as I know there are no other implementations for other languages, which is why it's not possible to run it without java.

Nightwatch sends HTTP requests to the Selenium-Standalone-Server (here comes java) and the server creates a session with the browser.

So to sum up: No Java --> No "Selenium-Standalone-Server" --> No testing with Nightwatch.js

Post Status

Asked in February 2016
Viewed 1,733 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life