Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b65e8b5c00089d016853e8d6583ec69873988665
      
https://github.com/WebKit/WebKit/commit/b65e8b5c00089d016853e8d6583ec69873988665
  Author: Lauro Moura <[email protected]>
  Date:   2025-11-19 (Wed, 19 Nov 2025)

  Changed paths:
    M Source/WebKit/Shared/Automation/WebAutomationSessionMacros.h
    M Source/WebKit/UIProcess/Automation/BidiScriptAgent.cpp
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.h

  Log Message:
  -----------
  [WebDriver][BiDi] Process incoming frame handles before calling 
WebAutomationSession
https://bugs.webkit.org/show_bug.cgi?id=301932

Reviewed by BJ Burg.

Some WebDriver-BiDi commands allow targeting specific browsing contexts,
including child ones (e.g. frames). But, at least for
`script.callFunction` and `script.evaluate`, currently we require the
incoming context to be a top level context.

This commit ensures we translate the incoming handle to the browsing
context handle / frame handle pair that `evaluateJavaScriptFunction`
expects, so the code gets executed on the proper child context.

This is also required by a test on subscribing to child contexts.

Another included fix is that the new spec returns FrameNotFound when it
fails to get a navigable, instead of the current WindowNotFound.

* Source/WebKit/Shared/Automation/WebAutomationSessionMacros.h:
* Source/WebKit/UIProcess/Automation/BidiScriptAgent.cpp:
(WebKit::BidiScriptAgent::callFunction):
(WebKit::BidiScriptAgent::evaluate):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::extractBrowsingContextHandles):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:

Canonical link: https://commits.webkit.org/303294@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to