Created
November 13, 2020 17:02
-
-
Save willycedric/c0047e1be0b5db42b2066e176739100e to your computer and use it in GitHub Desktop.
Selenium grid status (prior to v4)
This file contains hidden or 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
#!/usr/bin/env bash | |
# check-grid.sh | |
set -e | |
HOST="localhost" | |
PORT="4444" | |
echoerr() { echo "$@" 1>&2; } | |
# process arguments | |
while [[ $# -gt 0 ]] | |
do | |
case "$1" in | |
--host) | |
HOST=${2:-"localhost"} | |
shift 2 | |
;; | |
--port) | |
PORT=${2:-"4444"} | |
shift 2 | |
;; | |
*) | |
echoerr "Unknown argument: $1" | |
exit 1 | |
;; | |
esac | |
done | |
curl -sSL http://${HOST}:${PORT}/wd/hub/status | jq -r '.value.ready' | grep "true" || exit 1 |
Author
willycedric
commented
Nov 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment