Add User-Agent with Playwright version to WebSocket requests - #1729
Add User-Agent with Playwright version to WebSocket requests#1729headlesstesting (headlesstesting) wants to merge 1 commit into
Conversation
This adds a `Playwright: {version}` user-agent header to WebSocket requests.
Yury Semikhatsky (yury-s)
left a comment
There was a problem hiding this comment.
The idea of passing version info in a header sgtm, I'm a bit concerned that this approach may not work if the client runs in a web page in the future.
|
Super interesting patch! I agree with Yury that it would be nice if this was done in a web compatible way. From my research, it looks like I'm also interested as to why you want the version number of playwright, but not which browser ( |
|
Hi Joel Einbinder (@JoelEinbinder) , Yury Semikhatsky (@yury-s) : your comment about web compatibility makes sense. In Javascript:
Node: I think this would be better than using The browser can be specified with the wsEndpoint, we provide several options:
|
|
So what is the status of this? It hasn't been updated for a few months and doesn't seem to attract much interest... headlesstesting (@headlesstesting) did you guys workaround this on your end? |
|
I guess it's not relevant any more :) |
|
Hi, we've not pursued this, perhaps at a later stage, we can come back with a new PR. Thanks! |
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This adds a
Playwright: {version}user-agent header to WebSocket requests.The reason why we think this PR is useful, is because for people using Playwright with our service, we can automatically determine the most compatible browser version by looking at the Playwright version string.