Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b619594eed45ca227b9178a5d46b1c059398e67
      
https://github.com/WebKit/WebKit/commit/7b619594eed45ca227b9178a5d46b1c059398e67
  Author: Lauro Moura <[email protected]>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    M Source/WebDriver/Session.cpp
    M Source/WebDriver/Session.h
    M WebDriverTests/TestExpectations.json

  Log Message:
  -----------
  [WebDriver] Elements references nested in arrays or objects are not extracted 
when executing scripts
https://bugs.webkit.org/show_bug.cgi?id=300462

Reviewed by Carlos Garcia Campos.

Currently, we are just translating/extracting the element references for
the top level arguments when evaluating JS functions. This may lead to
failures when the element reference is nested in an Array or Object,
like for Selenium's snippets for some selectors like `relative-by`

This commit traverses the arguments in a similar fashion to the "JSON
deserialize" algorithm [1], making sure all element references are
processed.

[1] https://www.w3.org/TR/webdriver/#dfn-json-deserialize

* Source/WebDriver/Session.cpp:
(WebDriver::Session::extractElement):
(WebDriver::Session::extractElementID):
(WebDriver::Session::replaceReferences):
(WebDriver::Session::executeScript):
* Source/WebDriver/Session.h:
* WebDriverTests/TestExpectations.json:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to