Fix browsingContext.getTree with unloaded tabs in WebDriver BiDi
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
(Whiteboard: [webdriver:backlog])
As discussed in https://phabricator.services.mozilla.com/D199225#6843354, unloaded tabs are not really well supported in our current BiDi commands and events.
Known issues:
- session data items for a specific context rely on
browserId
, which is 0 for unloaded tabs browsingContext.getTree
throws if there is any unloaded tab, becausebrowser.browsingContext
is null for unloaded tabsbrowsingContext.contextCreated
is not emitted when an unloaded tab is added to the browser
Overall I'm unsure what the specs think about unloaded tabs. Such tabs don't have a document, so I think they don't really match the definition of a navigable per https://html.spec.whatwg.org/multipage/document-sequences.html#navigable . For the contextCreated
event, it should only be emitted when the document of the context is set, which I assume is not the case for an unloaded tab?
We probably at least want to fix what's completely broken when there is an unloaded tab (eg getTree) and discuss how we want to support unloaded tabs for specific commands.
Comment 1•1 year ago
|
||
Lets get it discussed in one of the next triage meetings. Situations when this would become important is when Firefox is quit and run with the same profile again while session store is active and set to restore all tabs. While pinned tabs are loaded automatically all the others are not except the currently active tab.
Reporter | ||
Comment 2•1 year ago
|
||
Should be discussed in the working group. I will file an issue on the bidi repo.
Let's use this bug to fix the complete breakage of some commands
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 3•1 year ago
•
|
||
Updated•1 year ago
|
Description
•