Skip to content

deviceScaleFactor option in newContext on Browser class isn't affecting the images #4438

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

Open
ankur22 opened this issue Jul 5, 2022 · 1 comment

Comments

@ankur22
Copy link
Contributor

ankur22 commented Jul 5, 2022

Tested against: dbede12

The result of deviceScaleFactor of 1 should result in a blurry image as shown here:

[PW deviceScaleFactor set to 1]
Screenshot 2022-07-05 at 16 13 02

And when it is set to 2, then it should look like this:

[PW deviceScaleFactor set to 2]
Screenshot 2022-07-05 at 16 12 50

In xk6-browser the result of deviceScaleFactor is always the same regardless of the value set (the blurry image).

@ankur22
Copy link
Contributor Author

ankur22 commented Jul 5, 2022

This works with the default BrowserContext, but it doesn't work when a second context is created.

@ankur22 ankur22 changed the title deviceScaleFactor option in newContext on Browser` class isn't affecting the images deviceScaleFactor option in newContext on Browser class isn't affecting the images Jul 5, 2022
@inancgumus inancgumus transferred this issue from grafana/xk6-browser Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants