1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

Browser+WebContent+WebDriver: Move Take Element Screenshot to WebContent

This commit is contained in:
Timothy Flynn 2022-11-10 13:33:18 -05:00 committed by Linus Groh
parent de1e882601
commit ea0561a0b3
15 changed files with 51 additions and 185 deletions

View file

@ -815,8 +815,7 @@ Web::WebDriver::Response Client::handle_take_element_screenshot(Vector<StringVie
{
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /session/<session_id>/element/<element_id>/screenshot");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->take_element_screenshot(parameters[1]));
return make_json_value(result);
return session->web_content_connection().take_element_screenshot(parameters[1]);
}
}