Open Bug 1447024 Opened 6 years ago Updated 1 year ago

Focussed browsing context is not target for commands

Categories

(Remote Protocol :: Marionette, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

References

Details

Marionette currently assumes that the window is selected programmatically
using WebDriver:SwitchToWindow, but the WebDriver specification
makes no such provisions.  To the contrary, it says that the target
of commands should be the _current browsing context_, which is the
(user-)selected browsing context.

We have also received a few puzzled bug reports from users
who try to manually interact with Firefox during a test run by
e.g. closing/opening tabs and dismissing user prompts.  This is a
valid use case with Marionette.

The window tracking refactoring in
https://bugzilla.mozilla.org/show_bug.cgi?id=1311041 improves
the situation but does not take the full step to use the currently
focussed browsing context as the target because it would break a number
of Mn tests.  We also have to fix some of the Marionette-specific
workarounds to do with contexts/frame/window switching before we
can fix this.
Priority: -- → P2

With bug 1311041 marked as wontfix, we would need another solution for this bug. But given that it is not important it can most likely wait until the Fission work has been done, and by then we might already have registered listeners on the windows to get informed about focus changes which would allow us to dynamically switch the browsing context.

Severity: normal → S3
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.