-
Notifications
You must be signed in to change notification settings - Fork 106
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
"useragent" passed is not honored when using "webkit" browser. #3383
Comments
@aaltat - Just wondering, if there any update on this ticket? Thanks. |
Not yet, https://robocon.io/ is near and it’s eating all available time |
I do not quite follow what you did expect to happen, but you can change user agent as you want in New Context keyword |
@aaltat When "webkit" is used, user agent provided in the script is not used when loading the application. Please refer to the attached webkit zip file above. In the screenshot, mac useragent is provided in the script "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" . However, application is loaded with windows user agent, as the test is run on windows machine. This is not an issue when using "chromium" browser. App is loaded with whatever useragent passed in the automation script. Please refer to the attached windows zip file above. Please let me know, if additional info is needed. |
Here is the code, we are using to invoke the app New Persistent Context url=${url} browser=${execution_browser} headless=${headless} userAgent=${userAgent} viewport=${viewport} url - "https://pwa-br-us-a.qa.tillster.com/" |
Browser library doesn’t not alter the parameter, we pass it as is in the Playwright side. This is a bug in the upstream side, meaning Playwright or Apple. Also we can’t fix this in the Browser library side. You need to raise the issue with Playwright and in the worst case to Apple. But because we can’t fix this, I am going to close this issue. |
Hi Rene, Can we please get an update on this ticket? Thanks, Sharmila |
No updates, no-one has not looked at the problem. If have a need, easiest way is to debug the issue by you and provide the fix. |
We understand, but we can’t give you a timeline or estimate when this could be fixed. Most likely answer is later than sooner. |
Describe the bug
user-agent passed file is not honored when using WebKit. Rather, the system config where the test runs is passed as the user agent.
To Reproduce
Steps to reproduce the behavior:
browser - "webkit"
user agent - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15
viewport - "{'width': 810, 'height': 1010}"
Actual behavior
Observe that user-agent passed is not honored when using WebKit. Rather, the system config where the test runs is passed as the user agent.
Screenshots
chromium.webm.zip
webkit.webm.zip
Desktop (please complete the following information):
OS: Windows
Browser: Webkit through automation
Version: Playwright version 1.0 [1]
Additional context
When loading a webpage using chromium or firefox without user agent, none is passed to user agent as expected. However, same issue as described exists when using webkit, system config where the test runs is passed as the user agent.
The text was updated successfully, but these errors were encountered: