From 419dea0996e4f67163188142c4c05819090dd24d Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sat, 24 Dec 2022 02:17:06 +0100 Subject: 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. --- Userland/Libraries/LibWeb/WebDriver/Client.cpp | 1 + Userland/Libraries/LibWeb/WebDriver/Client.h | 1 + 2 files changed, 2 insertions(+) (limited to 'Userland/Libraries/LibWeb') 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; -- cgit v1.2.3