Closed Bug 1729291 Opened 3 years ago Closed 3 years ago

WebDriver:GetWindowHandle and WebDriver:GetWindowHandles should return content or chrome window handles based on selected scope

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Default
enhancement

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

Details

Attachments

(1 file)

Right now Marionette has different entry points for fetching window handles of tabs and chrome windows. Because of that users of geckodriver who have switched to the chrome context aren't able to retrieve the current chrome window handle, or all chrome window handles - the end-point is just not supported.

I would propose that we get rid of the custom WebDriver:GetCurrentChromeWindowHandle
and WebDriver:GetChromeWindowHandles end-points and update both WebDriver:GetWindowHandle and WebDriver:GetWindowHandles to return the appropriate window handles based on the selected context.

This is a fairly huge change in Marionette and will break quite a couple of Marionette unit tests. I also expect side-effects for wpt tests.

Note that this actually blocks eg. addon authors from testing their add-ons when they have custom top-level windows.

I don't think wpt uses GetCurrentChromeWindowHandle at present, and it only really uses chrome scope in isolated commands (e.g. to get the assert count). So I think any breakage there would be small.

That sounds good. So it should be mainly the Firefox UI and Marionette unit tests only that are affected here.

Priority: -- → P3
Whiteboard: [webdriver:triage]

Both end-points for "WebDriver:GetChromeWindowHandle" and
"WebDriver:GetChromeWindowHandles" can be removed. Instead
when using chrome scope the "WebDriver:GetWindowHandle"
and "WebDriver:GetWindowHandles" need to be used, which now
return handles based on the currently selected scope.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ce8ba2992dd
[marionette] Removed chrome specific window handle getters. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: