Skip to content

Add a capability for returning the default user agent header value#652

Merged
OrKoN merged 2 commits intomainfrom
orkon/user-agent-capability
Mar 7, 2024
Merged

Add a capability for returning the default user agent header value#652
OrKoN merged 2 commits intomainfrom
orkon/user-agent-capability

Conversation

@OrKoN
Copy link
Copy Markdown
Contributor

@OrKoN OrKoN commented Feb 7, 2024

This PR would allow client to get the original default User-Agent header value. In Puppeteer, it would allow supporting the Browser.userAgent() API.

Closes #446


Preview | Diff

@OrKoN OrKoN requested a review from jrandolf-google February 7, 2024 08:26
Copy link
Copy Markdown
Contributor

@jrandolf-google jrandolf-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CDDL also needs to be updated.

@OrKoN OrKoN requested a review from jrandolf-google February 7, 2024 08:40
@OrKoN OrKoN marked this pull request as ready for review February 7, 2024 08:46
@OrKoN OrKoN requested review from jgraham and whimboo February 7, 2024 08:46
Copy link
Copy Markdown
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this yesterday and actually wonder if it wouldn't even be better to add the userAgent capability to the WebDriver classic specification. That way we wouldn't have to make this capability BiDi specific.

If you agree this PR would have to be changed to only update the CDDL definition.

@OrKoN
Copy link
Copy Markdown
Contributor Author

OrKoN commented Feb 8, 2024

@whimboo is there a requirement for that from the classic users?

@jgraham
Copy link
Copy Markdown
Member

jgraham commented Feb 8, 2024

So, in detail, the proposal as specified here is that you'd get an additional capability if the implementation supports BiDi irrespective of whether BiDi is requested or enabled (I think that's different to what I said in the previous discussion).

I still think that doesn't make any sense, and we should just add the capability directly to classic.

@OrKoN
Copy link
Copy Markdown
Contributor Author

OrKoN commented Feb 8, 2024

@jgraham I see, that makes sense. I have opened a PR here w3c/webdriver#1790

@OrKoN OrKoN force-pushed the orkon/user-agent-capability branch from 6f24609 to f57ecd1 Compare March 7, 2024 14:33
@OrKoN OrKoN requested a review from whimboo March 7, 2024 14:33
Copy link
Copy Markdown
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks.

@OrKoN OrKoN merged commit f00427b into main Mar 7, 2024
@OrKoN OrKoN deleted the orkon/user-agent-capability branch March 7, 2024 14:42
github-actions bot added a commit that referenced this pull request Mar 7, 2024
)

SHA: f00427b
Reason: push, by OrKoN

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
OrKoN added a commit that referenced this pull request Mar 19, 2024
)

* Add a capability for returning the default user agent header value

* update cddl
sadym-chromium pushed a commit that referenced this pull request Feb 25, 2025
)

* Add a capability for returning the default user agent header value

* update cddl
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

Successfully merging this pull request may close these issues.

Ability to get the user agent

4 participants