webdriver: Improve parsing of Frame and Window (#39012)

In #38745, we changed the id of Frame and Window as the result of
`ToString` trait. This PR
- adapts the parsing of frame/window accordingly.
- for frame, return the
[WindowProxy](https://developer.mozilla.org/en-US/docs/Web/API/WindowProxy)
object of the iframe as it's supposed to do.

Testing: `execute_{async_}script/arguments.py`

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-08-29 17:37:48 +08:00 committed by GitHub
parent 00c1f79a1d
commit 8305064522
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 22 deletions

View file

@ -151,7 +151,7 @@ partial interface Window {
undefined webdriverException(optional any result);
undefined webdriverTimeout();
Element? webdriverElement(DOMString id);
Element? webdriverFrame(DOMString id);
WindowProxy? webdriverFrame(DOMString id);
WindowProxy? webdriverWindow(DOMString id);
ShadowRoot? webdriverShadowRoot(DOMString id);
};