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

setWindowRect when nothing is possible #1844

Open
gsnedders opened this issue Oct 17, 2024 · 0 comments
Open

setWindowRect when nothing is possible #1844

gsnedders opened this issue Oct 17, 2024 · 0 comments

Comments

@gsnedders
Copy link
Contributor

See also #1826

The spec currently says under https://w3c.github.io/webdriver/#dfn-set-window-rect:

If the remote end does not support the Set Window Rect command for session's current top-level browsing context for any reason, return error with error code unsupported operation.

NOTE
In case the Set Window Rect command is partially supported (i.e. some combinations of arguments are supported but not others), the implmentation is expected to continue with the remaining steps.

Arguably, any implementation can support the Set Window Rect command because everything it does is behind branches like "if the implementation is able to set the dimensions of window" and "if the implementation is able to set the position of window", which results in it being a no-op (roughly; it dismisses prompts and exits fullscreen and restores the window, still).

https://issues.chromium.org/issues/40193012 changed the ChromeDriver behaviour to make it a no-op, rather than failing with unsupported operation, on Android. (See web-platform-tests/wpt#18465 (comment).)

We should probably tighten up the spec text, rather than using something like "does not support the Set Window Rect command" (because you clearly do, you're literally running the steps for it). One possible option is to actually move this step to after "window" as variable in the spec text has been defined, and then change the step to something like:

If the implementation is both unable to set the dimensions of window and unable to set the position of window, return error with error code unsupported operation.

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

No branches or pull requests

1 participant