Skip to content

Instantly share code, notes, and snippets.

@imRohan
Created August 21, 2017 13:17
Embed
What would you like to do?
Nightwatch Automated Start Bash Script
#!/bin/bash
driver=$1
if [[ $# -ne 1 ]]; then
echo "Please provide a driver name (chrome or firefox)"
exit 1
fi
echo "Setting up a virtual display using Xvfb..."
Xvfb :1 -screen 0 1024x768x16 & > ./logs/xvfb-log.txt
echo "Running tests in ${driver} environment..."
DISPLAY=:1.0 nightwatch --env ${driver} --verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment