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

Browser+WebContent+WebDriver: Move Take Screenshot to WebContent

This commit is contained in:
Timothy Flynn 2022-11-10 13:20:44 -05:00 committed by Linus Groh
parent 40b9d248be
commit de1e882601
9 changed files with 29 additions and 39 deletions

View file

@ -806,8 +806,7 @@ Web::WebDriver::Response Client::handle_take_screenshot(Vector<StringView> const
{
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /session/<session_id>/screenshot");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->take_screenshot());
return make_json_value(result);
return session->web_content_connection().take_screenshot();
}
// 17.2 Take Element Screenshot, https://w3c.github.io/webdriver/#dfn-take-element-screenshot