mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
WebContent+WebDriver: Move Find Element to WebContent
Note that this does nothing to "fix" how element references are created. We continue to return the element ID because, otherwise, all other element WebDriver endpoints would break. On the bright side, we avoid several IPC round trips now that we perform the entire 'find' operation in the WebContent process; and we are able to work directly on DOM nodes.
This commit is contained in:
parent
15916e5c14
commit
61de50c7fd
6 changed files with 120 additions and 58 deletions
|
@ -9,6 +9,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibIPC/ConnectionToServer.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebDriver/ElementLocationStrategies.h>
|
||||
#include <LibWeb/WebDriver/Response.h>
|
||||
#include <WebContent/Forward.h>
|
||||
#include <WebContent/WebDriverClientEndpoint.h>
|
||||
|
@ -37,11 +39,13 @@ private:
|
|||
virtual Messages::WebDriverClient::SetWindowRectResponse set_window_rect(JsonValue const& payload) override;
|
||||
virtual Messages::WebDriverClient::MaximizeWindowResponse maximize_window() override;
|
||||
virtual Messages::WebDriverClient::MinimizeWindowResponse minimize_window() override;
|
||||
virtual Messages::WebDriverClient::FindElementResponse find_element(JsonValue const& payload) override;
|
||||
|
||||
ErrorOr<void, Web::WebDriver::Error> ensure_open_top_level_browsing_context();
|
||||
void restore_the_window();
|
||||
Gfx::IntRect maximize_the_window();
|
||||
Gfx::IntRect iconify_the_window();
|
||||
ErrorOr<JsonArray, Web::WebDriver::Error> find(Web::DOM::ParentNode& start_node, Web::WebDriver::LocationStrategy using_, StringView value);
|
||||
|
||||
ConnectionFromClient& m_web_content_client;
|
||||
PageHost& m_page_host;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue