wiki.techinc.nl/tests/selenium/selenium.sh
addshore ea4e00d590 Use wd/hub not /wd/hub in selenium.sh
I have run into this before and we fixed it in the README
but not in this script (I wasn't using this script at the time)

This was changed in the README in change:
I85a9e7dbd9a66418c85585969adb5ac1548f5ef6

Bug: T182421
Change-Id: I6ab92c6a61a57dc313b05321d0789dcbeb776c94
2018-06-13 11:56:15 +00:00

15 lines
547 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Check the command before running in background so
# that it can actually fail and have a descriptive error
hash chromedriver
chromedriver --url-base=wd/hub --port=4444 &
CHROME_DRIVER_PID=$!
echo chromedriver running with PID $CHROME_DRIVER_PID
# Make sure it is killed to prevent file descriptors leak
function kill_chromedriver() {
# Use kill instead of killall to increase chances of this working on Windows
kill $CHROME_DRIVER_PID > /dev/null
}
trap kill_chromedriver EXIT
npm run selenium-test