grafana / xk6-browser

The browser module adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol to k6.
https://grafana.com/docs/k6/latest/javascript-api/k6-browser/
GNU Affero General Public License v3.0
342 stars 42 forks source link

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

Open ankur22 opened 2 years ago

ankur22 commented 2 years ago

Tested against: dbede120c63df43995813a847a25b0e66e289592

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 commented 2 years ago

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