Open jennifer-shehane opened 3 years ago
How about a global setting devicePixelRatio
in cypress.json
Experiments from @Bkucera on ways to set DPR:
when using Emulation.setDeviceMetricsOverride
to set dpr after browser launch
cy.screenshot
resolution is doubled (you can see chrome scaling the app when we send the screenshot cdp command)when using --force-device-scale-factor=2
can use layout.css.devPixelsPerPx
to set dpr dynamically or at launch
Notes after looking at individual frames coming from cdp: Chrome: when using Emulation.setDeviceMetricsOverride to set dpr after browser launch:
startScreencast
only change resolution when Emulation.setDeviceMetricsOverride
changes the actual screen size, not the dpr@jennifer-shehane Do you know if it's possible to set DPR on Electron browser as well?
What would you like?
Allow a way to configure device pixel ratio (DPR) of the machine for all browsers via a single config.
Why is this needed?
Other
cypress open
mode? Is it weird? Let's not do that if it's weird.Example
These are current defaults for DPR (effectively) and would be exposed this way: