Pass a ClickOptions object as the second argument to page.click(selector, options) or to elementHandle.click(options). Options let you choose the mouse button, number of clicks, press duration, and—through Puppeteer’s click options—an offset from the element’s center. For dynamic pages, a locator click can add readiness checks; if a click triggers navigation, start the navigation wait and click together.
What Puppeteer’s click methods do
The examples here follow the Puppeteer API reference displayed as version 25.12.0 when accessed on October 3, 2026. Check the reference and installed package’s types if your version differs.
page.click() finds an element by selector
page.click(selector, options) looks up the selector, scrolls the matched element into view when needed, and clicks its center using Page.mouse. If several elements match, it clicks the first. If none match, the promise rejects. The selector may use CSS or Puppeteer’s supported selector syntax. See the Page.click() API reference.
elementHandle.click() clicks an existing handle
Use handle.click(options) when you already hold an element handle. It also scrolls into view and clicks the center, but it throws if the element has detached from the DOM. A handle can become stale after navigation or when a page replaces the element. See ElementHandle.click().
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute#1 Best Overall
Click options and what they control
ClickOptions extends MouseClickOptions. The documented inherited properties include button, count, and delay; Puppeteer adds offset and debugHighlight. The exact allowed button values and offset type should be checked against your installed Puppeteer version’s type definitions and the MouseClickOptions and ClickOptions references.
| Option | Meaning | Practical use |
|---|---|---|
button |
Which mouse button to use. | Specify a button when the page’s behavior depends on it; verify accepted values for your installed version. |
count |
Number of clicks; defaults to 1. |
Set a value above one for repeated clicks, such as a double-click. |
delay |
Milliseconds between mouse press and release. | Use when the press duration matters. This is not a delay before Puppeteer begins clicking. |
offset |
Click point relative to the top-left of the element’s border box. | Target a point other than the center. Check the installed type definitions for the precise object shape. |
debugHighlight |
Optional experimental highlighting of the click location for 10 seconds. | Useful for visual debugging, but it may not work on every page and does not persist across navigation. |
Basic configured click
await page.click('button.submit', {
button: 'left',
count: 1,
delay: 100,
});
The example uses the documented option concepts. Confirm that the button value is valid for your installed version before relying on it in version-specific code.
Rank #2
Repeated clicks and offsets
Set count to the number of clicks you need. Set offset when a control’s clickable area is not centered where you want it. The API documentation establishes that the offset is measured from the border box’s top-left corner, but the retrieved reference passage does not establish the complete offset object shape. Use the TypeScript definition shipped with your installed Puppeteer package rather than guessing the shape.
Choose Page, handle, or locator
| Situation | Use | Important behavior |
|---|---|---|
| One direct selector-based click | page.click(selector, options) |
Clicks the center of the first match; rejects if there is no match. |
| You already have an element handle | handle.click(options) |
The handle can become detached, in which case the click throws. |
| Dynamic interface that needs readiness checks | page.locator(selector).click() |
Locator preconditions and its timeout can be configured. |
| The click triggers navigation | Promise.all([waitForNavigation(), click()]) |
Start both promises together to avoid missing the navigation event. |
Use a locator when readiness matters
Puppeteer’s page-interactions guide describes locator clicks as a higher-level option with configurable preconditions. You can disable or tune checks for viewport presence, visibility, enabled state, and a stable bounding box, and set a locator-specific timeout. A waitForSelector can wait for DOM availability, but it does not automatically retry an action that fails; a locator is often a better fit when the interaction itself should wait for readiness.
Recommended Free Tools
Rank #3
Wait for navigation without a race
Do not wait for navigation only after clicking: the navigation may already have started. Start the wait and click concurrently, as in the documented pattern:
const [response] = await Promise.all([
page.waitForNavigation(waitOptions),
page.click(selector, clickOptions),
]);
Replace waitOptions, selector, and clickOptions with the values for your page. See the Page.click() reference for the navigation-race warning.
Rank #4
Troubleshoot common click failures
- No element found:
page.click()rejects if the selector matches nothing. Check the selector and whether the element has been added to the DOM before clicking. If readiness matters, use locator preconditions or wait for the relevant condition. - The wrong matching element is clicked:
page.click()selects the first match. Make the selector more specific or use an approach that identifies the intended element rather than relying on document order. - Detached element error: A handle can refer to an element removed or replaced by the page. Re-query the element instead of reusing the stale handle.
- Navigation wait never catches the event: Start
waitForNavigation()and the click in the samePromise.all()call. - Click happens at an unexpected point: The default point is the element center. If you need an offset, use the installed package’s declared offset shape and remember it is relative to the border box’s top-left.
- Highlight is absent:
debugHighlightis experimental, may not work on all pages, and is temporary; it is not a persistent marker.
Or skip the browser setup
If your goal is to capture a page rather than automate a click, ScreenshotNeo returns a screenshot or PDF from one GET request. For example, this cURL request saves a WebP shot of Stripe; see the ScreenshotNeo API docs for parameters and response details:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
- Cookie banners and consent prompts, newsletter popups, and chat widgets are handled or removed before capture; each of those steps can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; responses include
X-Page-VerdictandX-Billedheaders. - An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents using Claude, Cursor, or another MCP client. - The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
Frequently Asked Questions
Does Puppeteer’s click delay wait before the click?
No. delay is the time in milliseconds between mouse press and release.
Does page.click() click every matching element?
No. It clicks the first element that matches the selector.
Is debugHighlight permanent?
No. The documented highlight lasts 10 seconds and does not persist across navigation.
Quick Recap
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.

