Selenium

 avatar
unknown
sh
2 years ago
442 B
3
Indexable
get_session_id() {
  curl -X POST -H "Content-Type: application/json; charset=UTF-8" -d '{"desiredCapabilities": {"browserName": "chrome"}}' http://192.168.29.244:4444/wd/hub/session | jq -r '.sessionId'
}

main() {
  # Open browser and navigate to Google
  time SESSION_ID=$(get_session_id)
  # Quit browser
  curl -X DELETE -H "Content-Type: application/json; charset=UTF-8" "http://192.168.29.244:4444/wd/hub/session/${SESSION_ID}"
}

main
Editor is loading...