3 # Check the command before running in background so
4 # that it can actually fail and have a descriptive error
6 chromedriver
--url-base=wd
/hub
--port=4444 &
8 echo chromedriver running with PID
$CHROME_DRIVER_PID
9 # Make sure it is killed to prevent file descriptors leak
10 function kill_chromedriver
() {
11 # Use kill instead of killall to increase chances of this working on Windows
12 kill $CHROME_DRIVER_PID > /dev
/null
14 trap kill_chromedriver EXIT