October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Puppeteer Click Options: How to Configure Clicks

Configure Puppeteer clicks with ClickOptions, choose between page, handle, and locator APIs, and avoid common selector and navigation races.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Pass a ClickOptions object as the second argument to page.click(selector, options), or pass the same kind of options to elementHandle.click(options). The options let you choose mouse-button behavior, click count, press duration, and—through Puppeteer’s own interface—an offset from the element’s top-left border-box corner. For dynamic pages, a locator click can add readiness checks; for a click that navigates, start the navigation wait and click together.

What page.click() does

page.click(selector, options) finds an element matching the selector, scrolls it into view if necessary, and clicks its center using Puppeteer’s mouse. If several elements match, it clicks the first. If none match, the promise rejects. The selector can use CSS or Puppeteer’s supported selector syntax. See the Page.click() API reference.

As an Amazon Associate I earn from qualifying purchases.

The API pages cited here display Puppeteer version 25.12.0, as accessed on October 3, 2026. Check the documentation and TypeScript definitions for the version installed in your project before relying on version-specific details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Click options you can configure

ClickOptions extends MouseClickOptions. Its documented inherited controls include the mouse button, click count, and press duration; Puppeteer’s click interface adds an offset and an optional debug highlight.

Option What it controls Notes
button Which mouse button to use. For example, 'left'. Consult the MouseClickOptions reference for the values supported by your installed version.
count How many clicks to perform. Defaults to 1. A value above one requests repeated clicks, such as a double-click.
delay How long, in milliseconds, to wait between mouse press and release. This is the duration of the press, not a wait before Puppeteer starts the click.
offset Where within the element to click, relative to the top-left corner of its border box. The API reference confirms the coordinate semantics; use the installed version’s TypeScript definitions for the exact offset object shape.
debugHighlight Optionally highlights the click location. Experimental, lasts 10 seconds, may not work on every page, and does not persist across navigation.

The ClickOptions interface reference documents the Puppeteer-specific properties.

Configure a selector click

This example uses the documented option concepts with page.click():

await page.click('button.submit', {
  button: 'left',
  count: 1,
  delay: 100,
});

Change count to request multiple clicks, or supply an offset when the center is not the target. Do not copy an assumed offset shape: confirm its type in your installed Puppeteer version’s TypeScript definitions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the right click API

Situation Use What to watch for
A direct click by selector page.click(selector, options) It clicks the center of the first match; no match rejects.
You already have an element handle handle.click(options) The handle can become detached if the DOM changes.
The interface is dynamic and needs readiness checks page.locator(selector).click() Locator preconditions and timeout can be configured.
The click triggers navigation Pair the click with page.waitForNavigation() Start both concurrently to avoid missing the navigation event.

When you have an element handle

ElementHandle.click(options) also scrolls the element into view when needed and clicks its center. It throws if that element has detached from the DOM, which can happen when a page update replaces the node. Avoid keeping a handle across a change that may rebuild the relevant DOM. See ElementHandle.click().

When the page is dynamic

A locator is the higher-level choice when an action should wait for the element to be ready. Puppeteer’s page-interactions guide describes configurable checks for viewport presence, visibility, enabled state, and a stable bounding box, as well as a per-locator timeout. By contrast, waitForSelector waits for DOM availability; it does not automatically retry a subsequent action that fails. See the Page interactions guide.

Wait safely when a click causes navigation

Do not wait for navigation only after clicking: the navigation event may already have started. Start the wait and click together with Promise.all:

const [response] = await Promise.all([
  page.waitForNavigation(waitOptions),
  page.click(selector, clickOptions),
]);

Set waitOptions and clickOptions to the values appropriate for your page and action. This concurrent pattern is the one documented in Puppeteer’s Page.click() reference.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot failed or unexpected clicks

  • The click promise rejects because no element was found: confirm the selector and that the target exists before clicking. If the page renders it asynchronously, use a locator with suitable readiness checks or wait for the relevant condition.
  • The wrong matching element is clicked: page.click() uses the first match. Make the selector specific enough to identify the intended target.
  • An element-handle click throws after a page update: the referenced node may have detached. Find the current element again rather than reusing a stale handle.
  • The click lands in the wrong part of the control: the default point is the center. Use an offset relative to the border box, checking the installed version’s offset type before writing the object.
  • The page navigates but the wait misses it: begin waitForNavigation() and the click in the same Promise.all, rather than starting the wait afterward.
  • A locator action times out or does not become ready: inspect its configured timeout and readiness preconditions, including visibility, enabled state, viewport presence, and bounding-box stability.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo captures a page as an image or PDF; it is not a substitute for Puppeteer when you need to interact with a page by clicking. If the goal is a clean screenshot rather than an interactive browser action, one GET request can capture a URL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Before capture, it can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Frequently Asked Questions

Does delay pause before Puppeteer clicks?

No. It specifies the wait between mouse press and release.

Can a page click selector target several matching elements at once?

No. page.click() clicks the first matching element.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.