Created
April 20, 2018 10:30
-
-
Save javigomez/60107eadf9208abb881ba10864fc38d0 to your computer and use it in GitHub Desktop.
Wait for Selenium Grid by @diemol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wait-for-grid.sh | |
set -e | |
cmd="$@" | |
while ! curl -sSL "http://hub:4444/wd/hub/status" 2>&1 \ | |
| jq -r '.value.ready' 2>&1 | grep "true" >/dev/null; do | |
echo 'Waiting for the Grid' | |
sleep 1 | |
done | |
>&2 echo "Selenium Grid is up - executing test" | |
exec $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment