pusk/lib/json.ml

38 lines
457 B
OCaml
Raw Normal View History

2023-05-13 15:57:03 +02:00
open Utils
2023-05-13 10:40:03 +02:00
let connection_payload =
{|
{
"capabilities": {
"alwaysMatch": {
"moz:firefoxOptions": {
"args": ["-headless"]
}
}
}
}
|}
;;
2023-05-13 15:57:03 +02:00
let navigate_payload url = fmt {|
{
"url": "%s"
}
|} url
let execute_payload src = fmt {|
{
"script": "%s",
"args": []
}
|} src
2023-05-13 20:31:46 +02:00
let find_payload strategy value =
fmt {|
{
"using": "%s",
"value": "%s"
}
|} strategy value
;;