Closed Bug 2080972 Opened 1 month ago Closed 1 month ago

Migrate list_pages to WebDriver BiDi using browsingContext.getTree

Categories

(Developer Infrastructure :: Firefox MCP, task, P2)

task
Points:
3

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 5 open bugs)

Details

(Whiteboard: [webdriver:m22])

Attachments

(1 external file)

The list_pages tool still uses classic, mostly through the refreshTabs helper. Migrating refreshTabs means that it also removes the Classic part of navigate_page, because refreshTabs() was its only Classic call.

To keep things consistent, we will also have to update commands relying on the same Classic helper as refreshTabs - getAllWindowHandles - namely select_page and close_page. Instead they should use the cached list of tabs generated by refreshTabs.

Blocks: 2080973
Blocks: 2080974
Blocks: 2080977
Blocks: 2081597

cc David Rubino: list_pages selects every tab in turn and brings its window to the front. This is disruptive if the user is using Firefox while the agent runs.

navigate_page, select_page and close_page do the same, because they all call PageManagement.refreshTabs. It calls classic switchTo().window() on each window handle, and Marionette focuses the tab by default. Moving to browsingContext.getTree should fix this.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Assignee: nobody → jdescottes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: