webdriver: Synchronize "close window" command & Return correct error type (#38620)

1. Synchronize [Close
Window](https://w3c.github.io/webdriver/#dfn-close-window) command to
reduce intermittency
2. There was a update last month exposing that we are not returning
correct error type for Session getter.
https://github.com/web-platform-tests/wpt/pull/53735
3. Other trivial fix

Testing: 
- `/webdriver/tests/classic/close_window/close.py` can now fully pass.
- `/webdriver/tests/classic/delete_session/*` can now fully pass.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-08-13 12:06:39 +08:00 committed by GitHub
parent 7fc2f31309
commit 6029976365
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 36 deletions

View file

@ -1,3 +0,0 @@
[close.py]
[test_close_last_browsing_context]
expected: FAIL

View file

@ -1,3 +0,0 @@
[delete.py]
[test_accepted_beforeunload_prompt]
expected: FAIL