RESOLVED FIXED 283784
[WebDriver][BiDi] Implement the browsingContext.getTree method
https://bugs.webkit.org/show_bug.cgi?id=283784
Summary [WebDriver][BiDi] Implement the browsingContext.getTree method
Lauro Moura
Reported 2024-11-27 21:58:21 PST
https://w3c.github.io/webdriver-bidi/#command-browsingContext-getTree Required by the `top_context` fixture, used in many BiDi tests in WPT repository: https://github.com/web-platform-tests/wpt/blob/master/webdriver/tests/support/fixtures.py#L484 ``` @pytest_asyncio.fixture async def top_context(bidi_session): contexts = await bidi_session.browsing_context.get_tree() return contexts[0] ``` In a nutshell: - If the `parent` argument is null, return a list with all top-level navigables - If `parent` is not null, run the "get navigable info" algorithm[1], to traverse the navigable tree under `parent`, collecting information. [1] https://w3c.github.io/webdriver-bidi/#get-the-navigable-info
Attachments
Lauro Moura
Comment 1 2024-11-27 22:01:13 PST
Given this is one of the many methods in the "browsingContext" module, add this one as a blocker for the main one, which can act as a meta bug. (In the log method at bug271956, the initial implementation went in the main bug as it's a single event, with futher updates blocked by it)
Radar WebKit Bug Importer
Comment 2 2024-12-04 22:38:52 PST
Lauro Moura
Comment 3 2025-05-23 21:46:53 PDT
EWS
Comment 4 2025-06-04 05:04:08 PDT
Committed 295805@main (09e8854c8548): <https://commits.webkit.org/295805@main> Reviewed commits have been landed. Closing PR #45875 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.