Last active
July 29, 2020 09:02
-
-
Save zentrope/4d2de1c441c7a1532a03edfbe16f4d52 to your computer and use it in GitHub Desktop.
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
(def (do-post) | |
(http-post "http://localhost:9515/session" | |
headers: '(("Content-Type" . "application/json; charset=utf-8") | |
("Accept-Encoding" . "identity") | |
("Accept" . "*/*")) | |
data: (json-object->string capabilities))) | |
(def (get-session) | |
(let (req (do-post)) | |
(for-each (lambda (h) (printf "~s~%" h)) (request-headers req)) | |
(displayln (request-text req)))) | |
(def chrome-driver-url | |
"http://localhost:9515/session/") | |
(def args | |
(hash (args '("--headless" "--disable-gpu")))) | |
(def chrome | |
(hash (browserName "chrome") | |
(goog:chromeOptions args))) | |
(def capabilities | |
(hash (capabilities (hash (firstMatch `(, chrome)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment