mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibWeb+WebContent+WebDriver: Implement Find Element From Shadow Root
This commit is contained in:
parent
4d9fd5d190
commit
6d9bd04233
7 changed files with 64 additions and 0 deletions
|
@ -359,6 +359,15 @@ Web::WebDriver::Response Client::find_elements_from_element(Web::WebDriver::Para
|
|||
return session->web_content_connection().find_elements_from_element(payload, parameters[1]);
|
||||
}
|
||||
|
||||
// 12.3.6 Find Element From Shadow Root, https://w3c.github.io/webdriver/#find-element-from-shadow-root
|
||||
// POST /session/{session id}/shadow/{shadow id}/element
|
||||
Web::WebDriver::Response Client::find_element_from_shadow_root(Web::WebDriver::Parameters parameters, JsonValue payload)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Handling POST /session/<session_id>/shadow/<shadow_id>/element");
|
||||
auto* session = TRY(find_session_with_id(parameters[0]));
|
||||
return session->web_content_connection().find_element_from_shadow_root(payload, parameters[1]);
|
||||
}
|
||||
|
||||
// 12.3.8 Get Active Element, https://w3c.github.io/webdriver/#get-active-element
|
||||
// GET /session/{session id}/element/active
|
||||
Web::WebDriver::Response Client::get_active_element(Web::WebDriver::Parameters parameters, JsonValue)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue