This commit is contained in:
Mylloon 2024-03-09 16:08:41 +01:00
parent bef57f2172
commit cc94b15e01
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -14,7 +14,7 @@ let connection_payload headless =
} }
} }
} }
|} |}
(if headless then "\"-headless\"" else "") (if headless then "\"-headless\"" else "")
;; ;;
@ -22,14 +22,14 @@ let navigate_payload url = fmt {|
{ {
"url": "%s" "url": "%s"
} }
|} url |} url
let execute_payload src = fmt {| let execute_payload src = fmt {|
{ {
"script": "%s", "script": "%s",
"args": [] "args": []
} }
|} src |} src
let find_payload strategy value = let find_payload strategy value =
fmt {| fmt {|
@ -37,7 +37,7 @@ let find_payload strategy value =
"using": "%s", "using": "%s",
"value": "%s" "value": "%s"
} }
|} strategy value |} strategy value
;; ;;
let send_keys_payload text = let send_keys_payload text =
@ -47,7 +47,7 @@ let send_keys_payload text =
"text": "%s", "text": "%s",
"value": %s "value": %s
} }
|} |}
text text
(Yojson.Safe.to_string (Yojson.Safe.to_string
(`List (List.map (fun str -> `String str) (keys_to_typing text)))) (`List (List.map (fun str -> `String str) (keys_to_typing text))))