LibWeb+WebContent: Use the current window to execute WebDriver scripts

Rather than using the page's top-level window, we must use the window
that is currently active in the WebDriver session.
This commit is contained in:
Timothy Flynn 2024-09-14 08:04:15 -04:00 committed by Tim Ledbetter
commit 4a6d0e0f90
Notes: github-actions[bot] 2024-09-14 23:57:38 +00:00
3 changed files with 18 additions and 21 deletions

View file

@ -35,7 +35,7 @@ struct ExecuteScriptResultSerialized {
using OnScriptComplete = JS::HeapFunction<void(ExecuteScriptResultSerialized)>;
void execute_script(Page& page, ByteString body, JS::MarkedVector<JS::Value> arguments, Optional<u64> const& timeout_ms, JS::NonnullGCPtr<OnScriptComplete> on_complete);
void execute_async_script(Page& page, ByteString body, JS::MarkedVector<JS::Value> arguments, Optional<u64> const& timeout_ms, JS::NonnullGCPtr<OnScriptComplete> on_complete);
void execute_script(HTML::BrowsingContext const&, ByteString body, JS::MarkedVector<JS::Value> arguments, Optional<u64> const& timeout_ms, JS::NonnullGCPtr<OnScriptComplete> on_complete);
void execute_async_script(HTML::BrowsingContext const&, ByteString body, JS::MarkedVector<JS::Value> arguments, Optional<u64> const& timeout_ms, JS::NonnullGCPtr<OnScriptComplete> on_complete);
}