Selenium tip#1

Here's a little useful snippet I found to wait for a node to be present in the selenium grid's console. You can change according to whatever you want it to show uo, of course...

# Wait for a chrome node
while ! (curl -sSL "http://localhost:4444/grid/console" | grep -i chrome) >/dev/null 2>&1; do echo -n "."; sleep 0.2; done

# Wait for a firefox node
while ! (curl -sSL "http://localhost:4444/grid/console" | grep -i firefox) >/dev/null 2>&1; do echo -n "."; sleep 0.2; done

#selenium #automation