Open whimboo opened 6 months ago
Conceptually it makes sense to always return capabilities that might not just reflect the input value. From that point of view I don't think returning unhandledPromptBehavior
makes a lot of sense.
But at this point I'm more worried about compatibility, and it seems more compatible to return the value than not. Therefore I wonder if we should adopt the model where all known capabilities are always returned, even if the value just matches the input?
Returning all the capabilities were used sounds reasonable, even though it creates a bit more traffic.
The Browser Testing and Tools Working Group just discussed Should the "New Session" command return default values for capabilities that have not been specified?
.
Follow-up from https://github.com/w3c/webdriver/pull/1812.
While implementing the user prompt handler changes for WebDriver BiDi for the
beforeunload
user prompt in Firefox I noticed that Firefox and Chrome return both the default value forunhandledPromptBehavior
when the capability has not been specified for theNew Session
command. Safari has a different handling here and doesn't return it.This question most likely also applies to other capabilities like
setWindowRect
and others. Some capabilities we use for matching and others not. So maybe we should only do that for those that are utilized for capability matching?If we agree that we should return the default value, the proposal for a fix could look like https://github.com/w3c/webdriver/pull/1812/commits/6294a9544899330017951cbe392f42798a4f0fe1.
CC @jgraham, @OrKoN, @sadym-chromium, @gsnedders, @AutomatedTester, @shs96c, @jimevans.