Use Pyppeteer’s page click method with a CSS attribute selector: await page.click('a[href="javascript:void(0)"]'). That targets an anchor with that exact href value and clicks it through the page’s mouse API. The handler—not the href text—determines whether the result is a dialog, an in-page update, a form action, or a navigation.
Click the anchor with a CSS attribute selector
For markup such as <a href="javascript:void(0)">Open details</a>, use:
await page.click('a[href="javascript:void(0)"]')
The selector matches an <a> element whose href attribute is exactly javascript:void(0). It does not identify what the link is meant to do; the page’s event handler supplies that behavior. This is the best first approach when you want the browser automation to click the element as a user-facing page interaction.
Use the selector only after the page has loaded the relevant element. If the page inserts it later, wait for the element or for the application state that creates it before calling click(). Pyppeteer also provides element-selection methods such as page.querySelector() and its shorthand page.J() when you need to inspect or handle the element directly.
Runnable example: click and wait for the right result
A click may navigate, but it may just change the current page. Choose the wait based on what the site actually does:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
import asyncio
from pyppeteer import launch
async def main():
browser = await launch()
try:
page = await browser.newPage()
await page.goto("https://example.com")
# Use this only if clicking the anchor is expected to navigate.
await asyncio.gather(
page.waitForNavigation(),
page.click('a[href="javascript:void(0)"]'),
)
# If it does not navigate, wait for the expected in-page result instead.
# For example, once you know the result selector:
# await page.waitForSelector(".details-panel")
finally:
await browser.close()
asyncio.get_event_loop().run_until_complete(main())
Replace https://example.com and, if applicable, .details-panel with the target page and the result your application produces. The paired navigation wait and click avoid starting the wait after navigation has already begun. Do not use that navigation wait for a click that only updates the existing page: no navigation will arrive, so the script can wait until its timeout.
When to use a DOM click instead
If CSS selection is awkward or you need to check that the element exists before acting, select it and pass it to page.evaluate():
link = await page.querySelector('a[href="javascript:void(0)"]')
if link is None:
raise RuntimeError("Link not found")
await page.evaluate('(el) => el.click()', link)
This calls the element’s DOM click() method. Pyppeteer documents passing an element into a JavaScript function through page.evaluate(). Prefer page.click(selector) when the distinction between a programmatic DOM click and a browser input click matters: the selector click uses the page mouse to click the element.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
If evaluation treats a string as an expression when you intended a function, Pyppeteer’s README documents force_expr=True for that case. Usually the function form shown above is clearer; use the option only when you have a specific evaluation-string parsing issue.
Adapt the selector to the actual markup
The exact selector is deliberately narrow. It only matches the stated tag and exact attribute value. Inspect the page’s rendered markup if the selector finds nothing, then adjust it to match what is really present. For example, a different tag, a different href value, or an element added only after another action requires a different selector or a wait.
- Confirm that the element exists at click time; a selector for an element not yet inserted cannot identify the intended control.
- Check whether the page contains multiple matching anchors. If it does, narrow the selector using a stable surrounding container or another attribute from the actual markup.
- Do not infer the outcome from the
href. A handler can open a dialog, update content, submit a form, or navigate. - Wait for the observable result of the handler—such as a new selector or state change—when it does not navigate.
Troubleshooting clicks that appear not to work
The selector does not find the link
Check the live DOM and confirm both the tag and the exact href value. The selector shown above does not match a similar but different value. Also determine whether the element is created after page load; wait for it or for the action that inserts it.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
The click completes but nothing visible changes
The anchor may have no effective handler, or the handler may have a result that is not immediately visible. Inspect what the page is supposed to do and wait for that specific outcome rather than assuming a click must navigate. The javascript:void(0) value is not a regular destination URL.
The script waits and then times out
If the wait is page.waitForNavigation(), verify that the link really navigates. For an in-page interaction, remove the navigation wait and wait for the relevant element or state instead. A navigation wait started for an event that never occurs cannot complete successfully.
A DOM click and a page click behave differently
They use different interaction paths: el.click() invokes the DOM method, while page.click(selector) uses the page mouse. Use the page click when browser-input interaction is important, and use the DOM method when direct programmatic activation is appropriate. Confirm the target site’s behavior rather than assuming the two are interchangeable.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Evaluation reports an expression or function issue
Pass a function string and the element argument as in the example. If Pyppeteer misdetects an evaluation string as a function or expression, its README describes force_expr=True for explicitly selecting expression evaluation.
Maintenance note for new automation work
Pyppeteer’s own repository warns that the project is unmaintained and suggests Playwright Python as an alternative. If a project specifically requires Pyppeteer, its documented click and evaluation methods remain the relevant APIs for this task; for a new project, consider the maintenance warning when choosing a browser automation library. The reviewed material establishes no comparative performance, reliability, or feature statistics, so there is no basis here to claim one tool is faster or more reliable.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If your goal is a screenshot rather than clicking the link or testing its handler, ScreenshotNeo can return a webpage capture with one API request. It does not click the anchor or verify the resulting interaction; use Pyppeteer for that.
Recommended Free Tools
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
See the ScreenshotNeo API documentation for request options. Before the capture, it accepts the cookie or consent banner as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response indicates the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients. 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.
Frequently Asked Questions
Does clicking this anchor execute the JavaScript written in its href?
The selector click activates the anchor, but javascript:void(0) itself is not a useful destination. The page’s event handler is what determines the action and result.
Should I use Pyppeteer for a new browser automation project?
Its repository warns that Pyppeteer is unmaintained and suggests Playwright Python as an alternative. Choose based on the maintenance needs of your project; the available material does not establish comparative performance.
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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →

