mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
WebDriver+Browser: Implement GET /session/{id}/source
This commit is contained in:
parent
82af1557dd
commit
61d0b66bfb
9 changed files with 49 additions and 0 deletions
|
@ -117,6 +117,18 @@ void WebDriverConnection::minimize_window()
|
|||
browser_window->set_minimized(true);
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::SerializeSourceResponse WebDriverConnection::serialize_source()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: serialize_source");
|
||||
if (auto browser_window = m_browser_window.strong_ref()) {
|
||||
auto& tab = browser_window->active_tab();
|
||||
if (tab.webdriver_endpoints().on_serialize_source)
|
||||
return { tab.webdriver_endpoints().on_serialize_source() };
|
||||
}
|
||||
|
||||
return { {} };
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::ExecuteScriptResponse WebDriverConnection::execute_script(String const& body, Vector<String> const& json_arguments, Optional<u64> const& timeout, bool async)
|
||||
{
|
||||
dbgln("WebDriverConnection: execute_script");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue