w3c / w3c/webdriver

Take Screenshot command missing "Handle any user prompts" step

Open
#1,678 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://w3c.github.io/webdriver/#take-screenshot

It appears that the spec is missing a step for the Take Screenshot command to handle user prompts after ensuring there is a browsing context and before taking the screenshot (between steps 1 and 2). There are WPT tests that rely on user prompts being handled (https://wpt.fyi/results/webdriver/tests/take_screenshot/user_prompts.py), so it seems like an accidental omission.

It appears Chrome, Edge, and Firefox already handle these prompts and Safari is the only browser not doing so anyways (we also have another bug preventing us from handling prompts in any test, but we don't even attempt to handle prompts for the take screenshot command currently).

Should the spec be updated, or am I missing something here? If there are no objections I can submit a PR to add the step.

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 with the Take Screenshot command section in the linked WebDriver specification and compare its steps with the WPT results for webdriver/tests/take_screenshot/user_prompts.py. Confirm the prompt-handling behavior and update the specification so the command’s documented steps match the expected tests; done means the relevant spec change is clear and the WPT expectations are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.