w3c / w3c/webdriver

Is "close window" expected to wait for the window to be closed?

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

Nobody has claimed this yet.

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

Description

https://w3c.github.io/webdriver/#close-window calls HTML's https://html.spec.whatwg.org/#close-a-browsing-context, but as far as I'm aware that doesn't synchronously close the window. I think in most implementations by the point that it returns it always will have closed the window, but the spec doesn't seem to guarantee this?

(Note that for HTTP-only sessions before unload is never fired, thus I believe it should always eventually succeed.)

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 WebDriver close-window section and the linked HTML “close a browsing context” definition. Check whether the referenced algorithm specifies synchronous completion, including the HTTP-only session note and before-unload behavior. Done means the specification’s expected waiting behavior is explicitly resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.