1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:07:35 +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

@ -607,6 +607,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
return active_tab().view().query_selector_all(start_node_id, selector);
};
new_tab.webdriver_endpoints().on_is_element_selected = [this](i32 element_id) {
return active_tab().view().is_element_selected(element_id);
};
new_tab.webdriver_endpoints().on_get_element_attribute = [this](i32 element_id, String const& name) {
return active_tab().view().get_element_attribute(element_id, name);
};