Bug 1708105 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

So we don't really keep any prompt state around right now, so most of these will need significant changes.

> Detect when a prompt / modal dialog gets opened. This is needed so that a running command in Marionette can be aborted (as defined in the WebDriver specification)

for this we could send an event here: https://searchfox.org/mozilla-central/rev/6371054f6260a5f8844846439297547f7cfeeedd/mobile/android/components/geckoview/GeckoViewPrompter.jsm#118 to let you know that we're opening a prompt, and it would have all the information like text/window/etc

>   Query a given tab/window for an open prompt / dialog

right now we have no knowledge of what window has a prompt opened

>  Get the prompt / dialog text
you could do this with the event above

> Set the prompt / dialog text
There's not really an API to do that right now, what is the purpose of this? doesn't marionette run in automation?

> Accept the prompt / dialog
> Dismiss the prompt / dialog

So we could do this using the event above, you could call something like prompter.dismiss() or whatever and Gecko will think the prompt doesn't exist anympre, but the UI won't be notified as right now we don't really have an API to notify of such events (in a normal browser the user is the only one that can dismiss a prompt).

We've discussed adding it for other reasons (e.g. when the page navigates) but I'm not sure if the UI piece of this is what's important to you or the Gecko side.

We can discuss this further in matrix/zoom if you prefer
So we don't really keep any prompt state around right now, so most of these will need significant changes.

> Detect when a prompt / modal dialog gets opened. This is needed so that a running command in Marionette can be aborted (as defined in the WebDriver specification)

for this we could send an event here: https://searchfox.org/mozilla-central/rev/6371054f6260a5f8844846439297547f7cfeeedd/mobile/android/components/geckoview/GeckoViewPrompter.jsm#118 to let you know that we're opening a prompt, and it would have all the information like text/window/etc

>   Query a given tab/window for an open prompt / dialog

right now we have no knowledge of what window has a prompt opened

>  Get the prompt / dialog text

you could do this with the event above

> Set the prompt / dialog text

There's not really an API to do that right now, what is the purpose of this? doesn't marionette run in automation?

> Accept the prompt / dialog
> Dismiss the prompt / dialog

So we could do this using the event above, you could call something like prompter.dismiss() or whatever and Gecko will think the prompt doesn't exist anympre, but the UI won't be notified as right now we don't really have an API to notify of such events (in a normal browser the user is the only one that can dismiss a prompt).

We've discussed adding it for other reasons (e.g. when the page navigates) but I'm not sure if the UI piece of this is what's important to you or the Gecko side.

We can discuss this further in matrix/zoom if you prefer
So we don't really keep any prompt state around right now, so most of these will need significant changes.

> Detect when a prompt / modal dialog gets opened. This is needed so that a running command in Marionette can be aborted (as defined in the WebDriver specification)

for this we could send an event here: https://searchfox.org/mozilla-central/rev/6371054f6260a5f8844846439297547f7cfeeedd/mobile/android/components/geckoview/GeckoViewPrompter.jsm#118 to let you know that we're opening a prompt, and it would have all the information like text/window/etc

>   Query a given tab/window for an open prompt / dialog

right now we have no knowledge of what window has a prompt opened

>  Get the prompt / dialog text

you could do this with the event above

> Set the prompt / dialog text

There's not really an API to do that right now, what is the purpose of this? doesn't marionette run in automation?

> Accept the prompt / dialog
> Dismiss the prompt / dialog

So we could do this using the event above, you could call something like prompter.dismiss() or whatever and Gecko will think the prompt doesn't exist anymore, but the UI won't be notified as right now we don't really have an API to notify of such events (in a normal browser the user is the only one that can dismiss a prompt).

We've discussed adding it for other reasons (e.g. when the page navigates) but I'm not sure if the UI piece of this is what's important to you or the Gecko side.

We can discuss this further in matrix/zoom if you prefer

Back to Bug 1708105 Comment 3