This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The way remote end handles unexpected modal dialogs[1] is currently defined in section Interactions >> ... >> sendKeys(). It really should be defined elsewhere, probably as part of the main algorithm of handling a command by the remote end, the Processing model section: http://w3c.github.io/webdriver/webdriver-spec.html#processing-model That is because not only sendKeys() but many other commands will have to "send an error" if a modal dialog is active. [1] "Unexpected" modal dialog is any modal dialog that is active when remote end receives a command that doesn't handle that modal dialog and that [the command] should fail because of that dialog being active.
*** This bug has been marked as a duplicate of bug 24816 ***