mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
Browser+WebContent+WebDriver: Move Take Element Screenshot to WebContent
This commit is contained in:
parent
de1e882601
commit
ea0561a0b3
15 changed files with 51 additions and 185 deletions
|
@ -607,10 +607,6 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
return active_tab().view().take_screenshot();
|
||||
};
|
||||
|
||||
new_tab.webdriver_endpoints().on_scroll_element_into_view = [this](i32 element_id) {
|
||||
active_tab().view().scroll_element_into_view(element_id);
|
||||
};
|
||||
|
||||
new_tab.webdriver_endpoints().on_serialize_source = [this]() {
|
||||
return active_tab().view().serialize_source();
|
||||
};
|
||||
|
@ -619,10 +615,6 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
return active_tab().view().webdriver_execute_script(body, json_arguments, timeout, async);
|
||||
};
|
||||
|
||||
new_tab.webdriver_endpoints().on_take_element_screenshot = [this](i32 element_id) {
|
||||
return active_tab().view().take_element_screenshot(element_id);
|
||||
};
|
||||
|
||||
new_tab.load(url);
|
||||
|
||||
dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue