summaryrefslogtreecommitdiff
path: root/Userland/Services/WebDriver/TimeoutsConfiguration.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-10-19 16:50:16 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-19 21:11:37 +0200
commitf0a8e3bc05c0d2d0fb21fd5cc1ea9c80c7982bf8 (patch)
treee777daf4916874ab1b385c6679b9d796f47604e1 /Userland/Services/WebDriver/TimeoutsConfiguration.h
parente5a9f030f24d9036d15864ad0df7893e889a4f6f (diff)
downloadserenity-f0a8e3bc05c0d2d0fb21fd5cc1ea9c80c7982bf8.zip
WebDriver: Replace hardcoded timeout with a TimeoutsConfiguration struct
Diffstat (limited to 'Userland/Services/WebDriver/TimeoutsConfiguration.h')
-rw-r--r--Userland/Services/WebDriver/TimeoutsConfiguration.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Userland/Services/WebDriver/TimeoutsConfiguration.h b/Userland/Services/WebDriver/TimeoutsConfiguration.h
new file mode 100644
index 0000000000..62af89bd3e
--- /dev/null
+++ b/Userland/Services/WebDriver/TimeoutsConfiguration.h
@@ -0,0 +1,21 @@
+/*
+ * 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 };
+};
+
+}