1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

WebDriver+Browser: Implement GET /session/{id}/element/{id}/selected

This commit is contained in:
Timothy Flynn 2022-11-03 17:05:47 -04:00 committed by Tim Flynn
parent 4067138702
commit 2d75229192
9 changed files with 55 additions and 0 deletions

View file

@ -218,6 +218,17 @@ Messages::WebDriverSessionClient::QuerySelectorAllResponse WebDriverConnection::
return { {} };
}
Messages::WebDriverSessionClient::IsElementSelectedResponse WebDriverConnection::is_element_selected(i32 element_id)
{
dbgln("WebDriverConnection: is_element_selected {}", element_id);
if (auto browser_window = m_browser_window.strong_ref()) {
auto& tab = browser_window->active_tab();
if (tab.webdriver_endpoints().on_is_element_selected)
return { tab.webdriver_endpoints().on_is_element_selected(element_id) };
}
return { false };
}
Messages::WebDriverSessionClient::GetElementAttributeResponse WebDriverConnection::get_element_attribute(i32 element_id, String const& name)
{
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: get_element_attribute");