1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

WebDriver: Implement GET /session/{id}/element/{id}/css/{name}

This commit is contained in:
Tobias Christiansen 2022-10-20 12:06:52 +02:00 committed by Linus Groh
parent 202b2be1f2
commit 354a845d65
7 changed files with 73 additions and 0 deletions

View file

@ -166,4 +166,26 @@ Messages::WebDriverSessionClient::GetElementPropertyResponse WebDriverConnection
return { {} };
}
Messages::WebDriverSessionClient::GetActiveDocumentsTypeResponse WebDriverConnection::get_active_documents_type()
{
dbgln("WebDriverConnection: get_active_documents_type");
if (auto browser_window = m_browser_window.strong_ref()) {
auto& tab = browser_window->active_tab();
if (tab.on_get_active_documents_type)
return { tab.on_get_active_documents_type() };
}
return { "" };
}
Messages::WebDriverSessionClient::GetComputedValueForElementResponse WebDriverConnection::get_computed_value_for_element(i32 element_id, String const& property_name)
{
dbgln("WebDriverConnection: get_computed_value_for_element");
if (auto browser_window = m_browser_window.strong_ref()) {
auto& tab = browser_window->active_tab();
if (tab.on_get_computed_value_for_element)
return { tab.on_get_computed_value_for_element(element_id, property_name) };
}
return { "" };
}
}