Skip to content

Instantly share code, notes, and snippets.

@corysimmons
Last active July 17, 2018 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corysimmons/30ed8a33f1b831c591206f384aa9c135 to your computer and use it in GitHub Desktop.
Save corysimmons/30ed8a33f1b831c591206f384aa9c135 to your computer and use it in GitHub Desktop.
How to get Selenium + chromedriver + Nightwatch working.

https://npm.im/selenium-standalone doesn't work with recent versions of JDK and will cause Nightwatch to explode.

selenium-standalone

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.

OR

java Command

Download/install the following from their websites in whatever order:

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.

@LinnJS
Copy link

LinnJS commented Jul 17, 2018

Dude thank you for this going through these troubles now... Miss you man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment