Module Make.Error
All potentital errors raised by the WebDriver protocol.
type error=[]type t={error : error;the WebDriver error
message : string;a human readable explanation
stacktrace : string;browser stacktrace
data : Yojson.Safe.t;additional metadatas
}
val to_string : t -> stringto_string errreturns a debug-friendly string of the WebDriver error.
val catch : (unit -> 'a cmd) -> ?errors:error list -> (t -> 'a cmd) -> 'a cmdcatch (fun () -> cmd) ?errors (fun err -> catch)runscmd, catching any WebDriver exceptions from?errors(or all if unspecified), then runscatchif necessary with the errorerras an argument.Some errors are less fatal than others: it's common to catch
`no_such_element, sleep and retry when the element in question is created by some (slow) javascript. SeeTimeoutsto add an implicit wait for this situation.
val fail : exn -> 'a cmdfail eraises the exceptione.