Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gsnedders opened this issue Oct 28, 2024 · 1 comment
Open

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

gsnedders opened this issue Oct 28, 2024 · 1 comment

Comments

@gsnedders
Copy link
Member

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.)

@whimboo
Copy link
Contributor

whimboo commented Oct 29, 2024

I believe steps 4 and 5 implicitly cover this, but I agree it would be helpful to provide a clearer description. Additionally, it would be beneficial to explicitly state that one of the remaining open windows should have the focus set (i.e., be the active window). Without this clarification, there could be cases where no active window is present because the flag hasn't yet been set to the next window in the z-order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants