w3c / w3c/webdriver

User prompt triggered by action in Perform Actions should cause the command to fail with 'unexpected alert open'

Open
#1,253 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug clarification Perform Actions
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

This is a straw man proposal to align user prompt handler usage with Execute Script. This was just changed so the user prompt handler is never invoked mid-command; instead the command fails with unexpected alert open' and a subsequent session command will run the user prompt handler.

It is kind of weird to expect to end an action chain with an unexpected alert open, in the sense that you'd always handle this case explicitly with an Alert-related command rather than relying on the user prompt handler. So, I'm not sure when the user prompt handler is actually useful.

Speaking to implementors' concerns, you can't interact with a page further when an alert shows up, so aborting the command keeps the state of the session sane. Interaction state (such as a gesture recognizer) is not normally maintained when an alert pops up, so it would be weird to do so for Perform Actions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the WebDriver specification sections covering Perform Actions, user prompt handlers, and the unexpected alert open error. Compare the current command and subsequent-command behavior described in the issue. Done means the specification clearly defines whether Perform Actions fails immediately and when the user prompt handler is invoked.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.