summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebDriver
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-11-16 07:24:22 -0500
committerLinus Groh <mail@linusgroh.de>2022-11-16 17:23:56 +0000
commit3e7d633954dbc7d045930677ba124a18be776836 (patch)
tree792d450c1a2eb44b96e3e8eebcb1632c8a91cd91 /Userland/Libraries/LibWeb/WebDriver
parent7cf2feb04739e79ef84b0585a1cdca26c111167f (diff)
downloadserenity-3e7d633954dbc7d045930677ba124a18be776836.zip
LibWeb+WebContent+WebDriver: Implement Accept Alert
Diffstat (limited to 'Userland/Libraries/LibWeb/WebDriver')
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/Client.cpp1
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/Client.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.cpp b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
index c3f1db095a..3c048eefec 100644
--- a/Userland/Libraries/LibWeb/WebDriver/Client.cpp
+++ b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
@@ -94,6 +94,7 @@ static constexpr auto s_webdriver_endpoints = Array {
ROUTE(DELETE, "/session/:session_id/cookie/:name"sv, delete_cookie),
ROUTE(DELETE, "/session/:session_id/cookie"sv, delete_all_cookies),
ROUTE(POST, "/session/:session_id/alert/dismiss"sv, dismiss_alert),
+ ROUTE(POST, "/session/:session_id/alert/accept"sv, accept_alert),
ROUTE(GET, "/session/:session_id/screenshot"sv, take_screenshot),
ROUTE(GET, "/session/:session_id/element/:element_id/screenshot"sv, take_element_screenshot),
};
diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.h b/Userland/Libraries/LibWeb/WebDriver/Client.h
index fcde92d2ba..0766c41fdd 100644
--- a/Userland/Libraries/LibWeb/WebDriver/Client.h
+++ b/Userland/Libraries/LibWeb/WebDriver/Client.h
@@ -88,6 +88,7 @@ public:
// 16. User prompts, https://w3c.github.io/webdriver/#user-prompts
virtual Response dismiss_alert(Parameters parameters, JsonValue payload) = 0;
+ virtual Response accept_alert(Parameters parameters, JsonValue payload) = 0;
// 17. Screen capture, https://w3c.github.io/webdriver/#screen-capture
virtual Response take_screenshot(Parameters parameters, JsonValue payload) = 0;