better err msg

This commit is contained in:
Mylloon 2023-05-13 17:21:05 +02:00
parent b1989bd79b
commit f76d4b46a6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -40,7 +40,7 @@ let get_session () =
| [] -> failwith "Session ID not found"
in
find_session_id (Yojson.Safe.Util.to_assoc value)
| _ -> failwith "Invalid JSON"
| _ -> failwith "get_session | Invalid JSON"
;;
let close_session id = execute_delete_request (driver id) = "{\"value\":null}"
@ -61,8 +61,8 @@ let rec wait_for_load session_id =
then (
Unix.sleep 1;
wait_for_load session_id)
| _ -> failwith "Error when waiting for load")
| _ -> failwith "Invalid JSON"
| _ -> failwith "Error when waiting for page to load")
| _ -> failwith "wait_for_load | Invalid JSON"
;;
let navigate ?(wait = true) url session_id =