Skip to content

Add support for "isMobile" argument for "browsingContext.setViewport" command #772

Open
@whimboo

Description

@whimboo

Both Puppeteer and Playwright support an isMobile boolean argument 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 isMobile is set to false, meaning the device is not treated as a mobile device and touch events are not enabled.

  • Mobile Mode: When isMobile is set to true, the browser will behave as if it's running on a mobile device. This includes rendering the website in mobile mode by taking the meta viewport tag and CSS media queries into account. Additionally, touch events are enabled, allowing mobile interactions like swiping and tapping.

Question: We currently support touch events in input.performActions by default. How should these behave when mobile mode is disabled? Should we consider disallowing their use in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions