mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
WebDriver+Browser: Implement POST /session/{id}/window/rect
This commit is contained in:
parent
dac91c5790
commit
174248678e
7 changed files with 119 additions and 0 deletions
|
@ -79,6 +79,29 @@ Messages::WebDriverSessionClient::GetWindowRectResponse WebDriverConnection::get
|
|||
return { {} };
|
||||
}
|
||||
|
||||
void WebDriverConnection::restore_window()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: restore_window");
|
||||
if (auto browser_window = m_browser_window.strong_ref()) {
|
||||
browser_window->show();
|
||||
browser_window->move_to_front();
|
||||
}
|
||||
}
|
||||
|
||||
void WebDriverConnection::set_window_size(Gfx::IntSize const& size)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: set_window_size {}", size);
|
||||
if (auto browser_window = m_browser_window.strong_ref())
|
||||
browser_window->resize(size);
|
||||
}
|
||||
|
||||
void WebDriverConnection::set_window_position(Gfx::IntPoint const& position)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: set_window_position {}", position);
|
||||
if (auto browser_window = m_browser_window.strong_ref())
|
||||
browser_window->move_to(position);
|
||||
}
|
||||
|
||||
Messages::WebDriverSessionClient::GetAllCookiesResponse WebDriverConnection::get_all_cookies()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: get_cookies");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue