Skip to content

Element click behavior on touchscreen devices #1925

@ogarai

Description

@ogarai

This is a follow-up from the Chrome Driver issue https://issues.chromium.org/issues/42320346.

The element click spec currently assumes a mouse interaction. However, it is desirable for element click to produce touch events (touchstart, touchend) when webdriver tests are run on touchscreen mobile devices, as a real user would use a tap gesture there, and many mobile sites are listening only for touch events.

Some corner cases need to be considered here:

  • A desktop device with a touchscreen could mean there is a mouse as well as a touchscreen, in which case generating touch events by default may not be desirable.
  • When emulating a mobile touchscreen device on desktop, it may need to behave similar to a real touchscreen-only device and generate touch events there as well.

It would be good to get clarification on whether touch events should be generated when performing an element click and how to ensure it is done where only touch and no mouse interactions are expected.

Alternatively, should there be a separate element tap command instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions