w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
676 stars 190 forks source link

Output-only capabilities #1792

Open gsnedders opened 4 months ago

gsnedders commented 4 months ago

Split from discussion on https://github.com/w3c/webdriver-bidi/issues/446 (c.f. https://github.com/w3c/webdriver/pull/1790#issuecomment-1935920012).

Not everything in https://w3c.github.io/webdriver/#capabilities has defined matching behaviour under https://w3c.github.io/webdriver/#dfn-matching-capabilities.

If I pass setWindowRect as an alwaysMatch capability, what should behaviour be?

Currently, under "For each name and value corresponding to capability’s own properties:", this falls through out of the "Otherwise" clause because:

This effectively means that we end up not doing any matching and we also don't fail as a result, and the returned value may well be different to the alwaysMatch value.

From a protocol point-of-view, it is exceptionally surprising that we end up with the returned value being different to the alwaysMatch value.

(Note I'm not super interested in setWindowRect specifically here—and indeed this is arguably a bug—but we do want to allow for other output-only capabilities, and we should define in general what should happen when they are passed in as a capability.)

whimboo commented 4 months ago

CC @jgraham