Add support for dynamic handling of modal dialogs and user prompts
Categories
(Remote Protocol :: Marionette, enhancement, P1)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #0)
Currently we suffer from the following:
- We only handle user prompts from a single tab. If multiple tabs have user
prompts open, those others are ignored.
Basically we interact with a single tab, and switching between all of them via WebDriver:SwitchToWindow
. So once the switch has been done, the driver should check if there are open modal dialogs, and populate the internal variable. Otherwise it stays null
.
- If an opened user prompt by a command is manually dismissed the internal
state is not getting updated, and Marionette still thinks that the user
prompt is present.
This is the reason because we don't have the right observer notifications registered. When manually dismissing an alert (or by the website itself) Marionette will not be informed about it, and we also do not update the internal variable at any point. Reason here is that we do not register for the DOMModalDialogClosed
observer notification.
Well, there might also be more...
Right, for example when the website opens an alert with a delay. So the next command as executed by Marionette will fail. Reason here is that we do not register for the tabmodal-dialog-loaded
observer notification.
Before we can get started with that work we have to wait for bug 1311041
being fixed.
Actually this isn't true. And given that this bug is wontfix now, lets get started...
Assignee | ||
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
With this patch Marionette registers globally for the dialog notifications
and events while a session is active. Also it provides an interface for
custom dialog handlers to hook in.
Instead of the callbacks custom events could have been fired, but that would
be some more work, and should preferable be done in a follow-up bug.
Depends on D34138
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D34139
Assignee | ||
Comment 14•5 years ago
|
||
I will have a fix for bug 1558763 landed soon, so I should remove the workaround in the patch.
Comment 15•5 years ago
|
||
Comment 18•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e9e20d087e33
https://hg.mozilla.org/mozilla-central/rev/5d6397e990cb
https://hg.mozilla.org/mozilla-central/rev/4651b31ffe5c
Assignee | ||
Comment 19•5 years ago
|
||
(In reply to Web Platform Test Sync Bot from comment #17)
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR https://github.com/web-platform-tests/wpt/pull/17319
- Taskcluster (pull_request)
(https://tools.taskcluster.net/task-group-inspector/#/eAueGSBNRKyFg8Q03R_Lkw)
It got manually merged by James yesterday. As it looks like no comment is getting added to Bugzilla in such a case. James, is that a missing feature or just a bug?
Comment 20•5 years ago
|
||
Missing feature I think. Feel free to file issues at https://github.com/mozilla/wpt-sync/issues dheiberg is going to work on this stuff, so it might even get fixed ;)
Assignee | ||
Comment 21•5 years ago
|
||
For reference this has been filed as https://github.com/mozilla/wpt-sync/issues/371.
Updated•2 years ago
|
Description
•