Skip to content

Add support for "hasTouch" argument for "browsingContext.setViewport" command #773

Open
@whimboo

Description

@whimboo

Both Puppeteer and Playwright support an hasTouch 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 hasTouch is set to false, meaning touch events are not enabled.

  • Touch enabled: When hasTouch is set to true, touch events are enabled, allowing interactions like swiping and tapping. This argument is independent from isMobile and allows to use touch emulation on desktop-like environments with touch capabilities (as with touch-enabled laptops or tablets).

Question: We currently support touch events in input.performActions by default. How should these behave when hasTouch 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