Bug 283784
| Summary: | [WebDriver][BiDi] Implement the browsingContext.getTree method | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Lauro Moura <lmoura> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, hskupin, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 281943 | ||
Lauro Moura
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
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
<rdar://problem/140959523>
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/45875
EWS
Committed 295805@main (09e8854c8548): <https://commits.webkit.org/295805@main>
Reviewed commits have been landed. Closing PR #45875 and removing active labels.