w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Auto-handle user prompts #556

Open jgraham opened 9 months ago

jgraham commented 9 months ago

Currently our handling of prompts and other alerts isn't ideal

Generally we probably want something that allows specifying the behaviour. For the file dialog case, it seems reasonable that in some cases I might want to know that there's a file dialog, but I might not want to dismiss it without either user interaction or the setFiles command. And for the alert() case it seems likely that there's cases where I just don't care about the alerts and want them to always be auto-dismissed.

jgraham commented 9 months ago

So possibly the solution here is something like WebDriver's user prompt handling capability, that would allow a session to set up how it wants to handle user prompts, maybe on a case-by-case basis.