summaryrefslogtreecommitdiff
path: root/Userland/Services/WebDriver/TimeoutsConfiguration.h
blob: 8b7e52a43fb802e102b92b05964e4c9e58d84822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Forward.h>
#include <AK/Optional.h>

namespace WebDriver {

// https://w3c.github.io/webdriver/#dfn-timeouts-configuration
struct TimeoutsConfiguration {
    Optional<u64> script_timeout { 30'000 };
    u64 page_load_timeout { 300'000 };
    u64 implicit_wait_timeout { 0 };
};

JsonObject timeouts_object(TimeoutsConfiguration const&);
ErrorOr<TimeoutsConfiguration, HttpError> json_deserialize_as_a_timeouts_configuration(JsonValue const&);

}