pusk/bin/main.ml

29 lines
533 B
OCaml
Raw Normal View History

2023-05-12 20:04:04 +02:00
open Pusk.Utils
open Pusk.Net
open Pusk.Drivers
2023-05-12 19:36:27 +02:00
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)
;;
2023-05-12 20:30:02 +02:00
2023-05-12 19:36:27 +02:00
let () =
let driver = prepare (Gecko "0.33.0") in
let driver_pid = run driver [] in
print_endline (fmt "Driver running as %d" driver_pid);
2023-05-13 10:39:51 +02:00
main
2023-05-12 19:36:27 +02:00
;;