w3c / w3c/webdriver

Handling `Print Preview` in WebDriver

Open
#1,862 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

While the current user prompt handler covers basic prompt types and beforeunload, there are other prompts or prompt-like pop-ups, such as Print Preview, that block the visible tab (including all its browsing contexts).

Print Preview is a unique case, raising the question of whether it should be handled at all from a WebDriver perspective. Since it behaves like its own window but runs in the browser’s chrome context, it might not require handling within the WebDriver protocol.

As mentioned in bug 1932525, both Chrome and Edge allow users to interact with Print Preview by switching to a specific window handle. However, this can be confusing because Print Preview is not a real tab and also blocks access to the underlying web content.

We’d like to discuss whether handling such dialogs is necessary, and if so, how it could be implemented effectively.

CC @jgraham @OrKoN @sadym-chromium @gsnedders @shs96c

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

Review the existing user-prompt handling and the behavior described in bug 1932525, including window-handle access to Print Preview in Chrome and Edge. A complete outcome would decide whether WebDriver should handle browser-chrome Print Preview and, if so, define an implementable protocol approach.

Written by the indexing model from the issue text.

Assessment

Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.