microsoft / microsoft/playwright

[Bug]: Synthesizing double or triple click events via "input.performActions" doesn't work with WebDriver BiDi

Open
#37,235 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bidi
Dominant language
TypeScript
Stars
96.3k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

### Version

latest

### Steps to reproduce

Run the `should dblclick the div` test in `page-mouse.spec.ts`:

https://github.com/microsoft/playwright/blob/bd4363e4af7761554bd7e02be94ea126dcab6b5b/tests/page/page-mouse.spec.ts#L55

### Expected behavior

The test should pass with a double click event generated.

### Actual behavior

The test fails because two independent `click` events are emitted by the browser only.

This happens because the multiple mouse down and up actions are part of different action chains. But with WebDriver BiDi to get double clicks those actions need to be part of the same action chain. See the discussion at:

https://github.com/w3c/webdriver/issues/1772#issuecomment-2801439996

### Additional context

_No response_

### Environment

```shell
As used in GitHub actions.
```

CC @hbenl

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the `should dblclick the div` test in `tests/page/page-mouse.spec.ts` at the referenced location. Trace how `input.performActions` builds the separate mouse action chains under WebDriver BiDi, using the linked WebDriver discussion for context. Done means the test passes and produces a double-click event rather than two independent click events.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.