Details property is not set correctly for triple clicks
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(Not tracked)
People
(Reporter: alexrudenko, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Steps to reproduce:
The issue was spotted when running Puppeteer tests with Firefox BiDi. TLDR; the following Puppeteer call triggers a triple click over BiDi: await page.click('textarea', {count: 3});
The test expects that three click events are dispatched and the detail property on each click event indicates the click count:
expect(
await page.evaluate(() => {
return window.clicks;
})
).toMatchObject({0: 1, 1: 2, 2: 3});
The complete test is here https://github.com/puppeteer/puppeteer/blob/main/test/src/click.spec.ts#L144
To run it, checkout Puppeteer, add '.only' to the it statement on the test and run the following steps:
npm ci
npm run clean # optional if you have a very old build
npm run build
PUPPETEER_PRODUCT=firefox npm ci
npm run test:firefox:bidi -- --no-coverage
Actual results:
- Page.click
should select the text by triple clicking:
Error: expect(received).toMatchObject(expected)
Expected: {"0": 1, "1": 2, "2": 3}
Received: [1, 1, 1]
at Context.<anonymous> (/Users/alexrudenko/src/puppeteer/test/src/click.spec.ts:163:7)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Expected results:
The test should pass.
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
The following is the BiDi command sent by Puppeteer:
{
"id": 19,
"method": "input.performActions",
"params": {
"context": "f7a4056f-7b61-4051-8d82-0b0d7ec6ba1c",
"actions": [
{
"type": "pointer",
"id": "__puppeteer_mouse",
"actions": [
{
"type": "pointerMove",
"x": 0,
"y": 0,
"origin": {
"type": "element",
"element": {
"type": "node",
"handle": "e04df329-13cb-46fa-b901-0663a6df749c",
"sharedId": "f69a1d8e-7afd-4ee0-a7cc-65e331d99216",
"value": {
"nodeType": 1,
"localName": "textarea",
"namespaceURI": "http://www.w3.org/1999/xhtml",
"childNodeCount": 0,
"attributes": {},
"shadowRoot": null
}
}
}
},
{ "type": "pointerDown", "button": 0 },
{ "type": "pointerUp", "button": 0 },
{ "type": "pointerDown", "button": 0 },
{ "type": "pointerUp", "button": 0 },
{ "type": "pointerDown", "button": 0 },
{ "type": "pointerUp", "button": 0 }
]
}
]
}
}
Reporter | ||
Comment 2•2 years ago
|
||
A similar issue seems to be happening with double clicks: the dblclick
event is not being emitted. It might be the same root cause or perhaps a separate issue.
Comment 3•2 years ago
|
||
I run the test and I can see the test failing with BiDi and passing with CDP. Maybe it's related to bug 1795327 and we have a general issue with triple clicks. I didn't investigate further yet, but mind find some time next week.
Comment 4•2 years ago
|
||
Note that it also doesn't help to add additional pauses between the individual actions. The whole paragraph is not getting selected.
Comment 5•2 years ago
|
||
I didn't expect to change the summary.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
The severity field is not set for this bug.
:whimboo, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Updated•1 year ago
|
Description
•