w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
351 stars 38 forks source link

Support emulation of the device pixel ratio #529

Closed whimboo closed 10 months ago

whimboo commented 11 months ago

Originally this request was part of https://github.com/w3c/webdriver-bidi/issues/415 but then we decided to only cover width and height for the beginning. What is still left for device emulation is the device pixel ratio override.

Most likely this will become an extra argument to the browsingContext.setViewport command.

css-meeting-bot commented 11 months ago

The Browser Testing and Tools Working Group just discussed Emulation features - Support emulation of the device pixel ratio.

The full IRC log of that discussion <AutomatedTester> topic: Emulation features - Support emulation of the device pixel ratio
<AutomatedTester> github: https://github.com/w3c/webdriver-bidi/issues/529
<AutomatedTester> q?
<AutomatedTester> whimboo: this is simiar to viewport emulation
<AutomatedTester> ... what we are missing the device pixel ratio so we are going to need a command to handle this
<gsnedders> q+
<AutomatedTester> ... we can add it to be part of the viewport emulation being set
<AutomatedTester> ack next
<AutomatedTester> Sam Sneddon [:gsnedders]: if you are a headless browser then this make sense
<jgraham> q+
<AutomatedTester> ... if you are not headless then does it make sense that you can try set this higher than the screen
<AutomatedTester> jgraham: no
<AutomatedTester> ... and example of this in wpt in reftests to set it to 1 so that its the same across browsers
<jgraham> ack jgraham
<orkon> makes sense to me too, including the unsupported operation
<gsnedders> Also we might want to question whether we want to call it device-pixel-ratio (c.f. -webkit-device-pixel-ratio) or follow the standard resolution name?