diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-03-13 17:45:34 +0300 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-03-16 13:17:37 -0400 |
commit | 126fa7df14e865ef00f5beb9aeac8c7d0dc5b20d (patch) | |
tree | 5c63b829074fcb6a58b6f9b39f6ce1b2b52dc7d4 /Userland/Services/WebContent/WebDriverConnection.cpp | |
parent | f28716582369cd7e79c3df7196278990d45492b7 (diff) | |
download | serenity-126fa7df14e865ef00f5beb9aeac8c7d0dc5b20d.zip |
WebContent+WebDriver: Get window handle from WebContent process
This change makes window handles on WebDriver process side be
consistent with handles returned by /window/new.
Diffstat (limited to 'Userland/Services/WebContent/WebDriverConnection.cpp')
-rw-r--r-- | Userland/Services/WebContent/WebDriverConnection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index bd157d4f70..74da18d6b5 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -522,6 +522,12 @@ Messages::WebDriverClient::GetTitleResponse WebDriverConnection::get_title() return title; } +// 11.1 Get Window Handle, https://w3c.github.io/webdriver/#get-window-handle +Messages::WebDriverClient::GetWindowHandleResponse WebDriverConnection::get_window_handle() +{ + return m_page_client.page().top_level_browsing_context().window_handle(); +} + // 11.2 Close Window, https://w3c.github.io/webdriver/#dfn-close-window Messages::WebDriverClient::CloseWindowResponse WebDriverConnection::close_window() { |