(Created on )

Puppeteer: '{value}' is not pressed.

mouse.up is called for a button not currently held down.


mouse.up is called for a button not currently held down.

Error message

'{value}' is not pressed.

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

How this error happens

mouse.up releases a held button. Calling it before mouse.down, or releasing it twice, has no matching press.

The snippets use an open Puppeteer page named page.

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

How to fix

Keep presses and releases paired, or use mouse.click for a complete click.

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

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

Things to keep in mind

The failing example assumes a fresh page whose left mouse button is not held.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →