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

WebDriver: Implement POST /session/{id}/back endpoint

This commit is contained in:
Moustafa Raafat 2022-10-15 18:15:38 +01:00 committed by Linus Groh
parent 443ffab9dc
commit 9132656856
7 changed files with 46 additions and 0 deletions

View file

@ -53,4 +53,11 @@ void WebDriverConnection::refresh()
browser_window->active_tab().reload();
}
void WebDriverConnection::back()
{
dbgln("WebDriverConnection: back");
if (auto browser_window = m_browser_window.strong_ref())
browser_window->active_tab().go_back();
}
}

View file

@ -40,6 +40,7 @@ public:
virtual void set_url(AK::URL const& url) override;
virtual Messages::WebDriverSessionClient::GetTitleResponse get_title() override;
virtual void refresh() override;
virtual void back() override;
private:
WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, NonnullRefPtr<BrowserWindow> browser_window);

View file

@ -7,4 +7,5 @@ endpoint WebDriverSessionClient {
set_url(URL url) =|
get_title() => (String title)
refresh() =|
back() =|
}