https://npm.im/selenium-standalone doesn't work with recent versions of JDK and will cause Nightwatch to explode.
- Install JDK version 8
- Add this to your shell's profile:
export JAVA_HOME=/usr/libexec/java_home -v 1.8
- Restart shell
cd ~/Your Project
yarn add -D selenium-standalone
selenium-standalone install
selenium-standalone start
- Nightwatch tests should work.
Download/install the following from their websites in whatever order:
- Latest JDK
- Latest Selenium Standalone Server
- Latest chromedriver
Run this command:
java -Dwebdriver.chrome.driver=/absolute/path/to/chromedriver -jar /absolute/path/to/selenium-server-standalone-3.12.0.jar
Now your Nightwatch tests should work with Chrome.
selenium-standalone
is already a dev dependency in ag.js and should be installed byyarn
. You shouldn't need to install it withnpm
.