mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:47:44 +00:00
Browser+WebContent+WebDriver: Move Take Screenshot to WebContent
This commit is contained in:
parent
40b9d248be
commit
de1e882601
9 changed files with 29 additions and 39 deletions
|
@ -146,18 +146,6 @@ void WebDriverConnection::scroll_element_into_view(i32 element_id)
|
|||
}
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::TakeScreenshotResponse WebDriverConnection::take_screenshot()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: take_screenshot");
|
||||
if (auto browser_window = m_browser_window.strong_ref()) {
|
||||
auto& tab = browser_window->active_tab();
|
||||
if (tab.on_take_screenshot)
|
||||
return { tab.on_take_screenshot() };
|
||||
}
|
||||
|
||||
return { {} };
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::TakeElementScreenshotResponse WebDriverConnection::take_element_screenshot(i32 element_id)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: take_element_screenshot {}", element_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue