From d559fb8b7eb144293bf24b119eb62c4d5692ff06 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 24 Aug 2023 01:05:39 +0200 Subject: [PATCH] WebContent: Update `wait_for_navigation_to_complete` to use navigables --- Userland/Services/WebContent/WebDriverConnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 3872c73fc8..915b62e893 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1911,7 +1912,7 @@ ErrorOr WebDriverConnection::wait_for_navigation_to // 4. If there is an ongoing attempt to navigate the current browsing context that has not yet matured, wait for navigation to mature. Web::Platform::EventLoopPlugin::the().spin_until([&] { - return !m_page_client.page().has_ongoing_navigation(); + return m_page_client.page().top_level_traversable()->ongoing_navigation() == Empty {}; }); // 5. Let readiness target be the document readiness state associated with the current session’s page loading strategy, which can be found in the table of page load strategies.