Open
Description
Both Puppeteer and Playwright support an isLandscape
boolean parameter for the setViewport
command, which is currently missing in WebDriver BiDi. We should add support for this parameter with the following behavior:
-
Default Behavior: By default,
isLandscape
is set tofalse
, meaning the orientation will not change, even if thewidth
is smaller than theheight
of the requested viewport. -
Landscape Mode: If
isLandscape
is set totrue
, the provided dimensions will automatically swap when thewidth
is smaller than theheight
(e.g., a setting of 800x1280 will result in a viewport of 1280x800). -
Portrait Mode: To force portrait mode,
isLandscape
should be set tofalse
, and the dimensions must be manually specified (e.g., 800x1280).