diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-12-24 02:17:06 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-25 17:24:52 +0100 |
commit | 419dea0996e4f67163188142c4c05819090dd24d (patch) | |
tree | 6e5106210aa794b053767db871da2a2e5a241094 /Userland/Libraries/LibWeb/WebDriver | |
parent | 6a72a4df963da2fabedef3fc4a88f17b62318290 (diff) | |
download | serenity-419dea0996e4f67163188142c4c05819090dd24d.zip |
WebDriver: Implement stub for .../element/{element id}/click
This patch adds a stub implementation for the POST
/session/{session id}/element/{element id}/click endpoint.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebDriver')
-rw-r--r-- | Userland/Libraries/LibWeb/WebDriver/Client.cpp | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/WebDriver/Client.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.cpp b/Userland/Libraries/LibWeb/WebDriver/Client.cpp index 05e1d0564a..69a03277af 100644 --- a/Userland/Libraries/LibWeb/WebDriver/Client.cpp +++ b/Userland/Libraries/LibWeb/WebDriver/Client.cpp @@ -86,6 +86,7 @@ static constexpr auto s_webdriver_endpoints = Array { ROUTE(GET, "/session/:session_id/element/:element_id/name"sv, get_element_tag_name), ROUTE(GET, "/session/:session_id/element/:element_id/rect"sv, get_element_rect), ROUTE(GET, "/session/:session_id/element/:element_id/enabled"sv, is_element_enabled), + ROUTE(POST, "/session/:session_id/element/:element_id/click"sv, click), ROUTE(GET, "/session/:session_id/source"sv, get_source), ROUTE(POST, "/session/:session_id/execute/sync"sv, execute_script), ROUTE(POST, "/session/:session_id/execute/async"sv, execute_async_script), diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.h b/Userland/Libraries/LibWeb/WebDriver/Client.h index a282e3cb5e..099c3f63c7 100644 --- a/Userland/Libraries/LibWeb/WebDriver/Client.h +++ b/Userland/Libraries/LibWeb/WebDriver/Client.h @@ -74,6 +74,7 @@ public: virtual Response get_element_tag_name(Parameters parameters, JsonValue payload) = 0; virtual Response get_element_rect(Parameters parameters, JsonValue payload) = 0; virtual Response is_element_enabled(Parameters parameters, JsonValue payload) = 0; + virtual Response click(Parameters parameters, JsonValue payload) = 0; // 13. Document, https://w3c.github.io/webdriver/#document virtual Response get_source(Parameters parameters, JsonValue payload) = 0; |