Puppeteer: Unsupported mouse button: {value}
The mouse button is not one of the supported button values.
The mouse button is not one of the supported button values.
Error message
Unsupported mouse button: {value}
{value} is replaced by the value shown in your error message.
How this error happens
button is a supported mouse-button identifier. primary is not the identifier expected by this API.
The snippets use an open Puppeteer page named page.
await page.mouse.click(
100,
100,
{
button: "primary",
}
);
How to fix
Use left, right, middle, back or forward, as appropriate.
await page.mouse.click(
100,
100,
{
button: "left",
}
);
Things to keep in mind
Browser support for the extra back and forward buttons can differ.