pusk/bin/main.ml
2023-05-13 10:39:51 +02:00

28 lines
533 B
OCaml

open Pusk.Utils
open Pusk.Net
open Pusk.Drivers
let main =
let json_payload =
{|
{
"capabilities": {
"alwaysMatch": {
"moz:firefoxOptions": {
"args": ["-headless"]
}
}
}
}
|}
in
let body = send_post_request "http://localhost:4444/session" json_payload in
print_endline (Lwt_main.run body)
;;
let () =
let driver = prepare (Gecko "0.33.0") in
let driver_pid = run driver [] in
print_endline (fmt "Driver running as %d" driver_pid);
main
;;