(Created on )

Puppeteer: '{value}' is already pressed.

mouse.down is called for a button already held down.


mouse.down is called for a button already held down.

Error message

'{value}' is already pressed.

{value} is replaced by the value shown in your error message.

How this error happens

Mouse buttons have a held/released state. A second down call for the same held button is not another click.

The snippets use an open Puppeteer page named page.

await page.mouse.down({
    button: "left",
});

await page.mouse.down({
    button: "left",
});

How to fix

Pair each press with a release. For ordinary clicks, let mouse.click manage that sequence.

await page.mouse.down({
    button: "left",
});

await page.mouse.up({
    button: "left",
});

Things to keep in mind

Run the correction from a fresh released state, not after leaving the button held by the failing snippet.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →