1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

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

This commit is contained in:
Tobias Christiansen 2022-10-19 16:58:14 +02:00 committed by Linus Groh
parent 3f5a620b5d
commit 249350a7a3
7 changed files with 65 additions and 0 deletions

View file

@ -144,4 +144,15 @@ Messages::WebDriverSessionClient::QuerySelectorAllResponse WebDriverConnection::
return { {} };
}
Messages::WebDriverSessionClient::GetElementAttributeResponse WebDriverConnection::get_element_attribute(i32 element_id, String const& name)
{
dbgln("WebDriverConnection: get_element_attribute");
if (auto browser_window = m_browser_window.strong_ref()) {
auto& tab = browser_window->active_tab();
if (tab.on_get_element_attribute)
return { tab.on_get_element_attribute(element_id, name) };
}
return { {} };
}
}