-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add a capability for returning the default user agent header value #1790
Conversation
b0401c0
to
b834d2b
Compare
This looks fine to me. @jgraham and @gsnedders mind checking as well? |
Does this not also need processing in "validate capabilities" (and maybe more in "matching capabilities"? it's not clear to me whether that's deliberately only a subset of capabilities). As far as I can tell, with this PR passing: {
"capabilities": {
"alwaysMatch": {
"userAgent": "This/1.0 Is/2.0 Not/3.0 (A User-Agent String"
}
}
} …does nothing, and it will still manage to satisfy the capabilities? |
@gsnedders I intended to add userAgent as an output capability only as described by this definition("provide any computed value to return to the user") so it should not be interpreted as part of the capabilities request (and my understanding is that in this case updates to the validation algorithms are not needed). |
Note that no-one will most likely match capabilities on the user agent string given its wide variance. Therefore we have the |
So I believe the following in the request
would result in a failure to create a session according to https://w3c.github.io/webdriver/#dfn-matching-capabilities (Step 3, the Otherwise clause). We had a discussion with @sadym-chromium and @jrandolf and we are wondering if we should instead allow clients to opt-in into getting the capability result? E.g., by sending
the client will receive the userAgent string in the response. |
Updated the PR to handle userAgent when matching capabilities. |
5dee860
to
48c3ce6
Compare
FWIW I'm happy with this only being returned, not used as the basis for a match. |
@OrKoN I assume that you want to add a new test for classic that checks for the user agent to be part of the session capabilities? We should probably have a separate test for now until all browsers have support for it. |
Co-authored-by: Henrik Skupin <[email protected]>
bc3f434
to
5d43fbb
Compare
@OrKoN are you going to add a wpt test for it? |
Yes, I am on it |
The capability cannot be used for matching as it only provides a computed value.
Issue w3c/webdriver-bidi#446
Related w3c/webdriver-bidi#652
Preview | Diff