summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent/WebDriverConnection.cpp
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2023-03-13 17:45:34 +0300
committerTim Flynn <trflynn89@pm.me>2023-03-16 13:17:37 -0400
commit126fa7df14e865ef00f5beb9aeac8c7d0dc5b20d (patch)
tree5c63b829074fcb6a58b6f9b39f6ce1b2b52dc7d4 /Userland/Services/WebContent/WebDriverConnection.cpp
parentf28716582369cd7e79c3df7196278990d45492b7 (diff)
downloadserenity-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.cpp6
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()
{