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 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchUse locator.setVisibility(value) to configure whether a Puppeteer locator waits for an element to be visible or hidden before an action. For example, .setVisibility(null) disables that visibility check. It changes the locator’s action behavior—not the element’s CSS or actual visibility on the page.
Set a locator’s visibility check
Call setVisibility() on a locator created with page.locator() or frame.locator(). The method returns a cloned locator with the visibility setting changed, so chain the returned locator into the action:
As an Amazon Associate I earn from qualifying purchases.
await page
.locator('button')
.setVisibility(null)
.click();
Here, null disables the locator’s visibility check. It does not reveal the button, change its CSS, or guarantee that the click will succeed. Puppeteer’s Locator.setVisibility() reference documents the method and its return type; the API reference defines the accepted visibility option.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Use a visibility value when you want the locator to check state
The visibility option configures whether the locator waits for the element to be visible or hidden before the action. Use the value appropriate to the state your interaction requires; use null only when you specifically want to disable this check.
#1 Best Overall
Locators are Puppeteer’s recommended way to select and interact with elements. They automatically wait for elements to be present and in the right state for an action. The Page interactions guide also lists viewport, visibility, enabled state, and a stable bounding box among click preconditions. Disabling visibility checking removes that check only; it does not disable every other precondition.
Choose between setVisibility() and waitForSelector()
These APIs address related but different tasks. Use setVisibility() to configure a locator action’s visibility check. Use waitForSelector() when you need an explicit wait for a selector’s DOM or visibility state and want to work with the resulting element handle.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
| API | Use it for | Result |
|---|---|---|
locator.setVisibility(value) |
Configuring the visibility check for a locator action | A locator with the changed setting |
page.waitForSelector(selector, options) |
Explicitly waiting for a selector to appear or become visible or hidden | An element handle, or null when a hidden selector is not found |
For waitForSelector(), visible: true waits for the element to be in the DOM and not use display: none or visibility: hidden. hidden: true waits until the element is absent or hidden by those CSS properties. The documented default timeout is 30,000 ms; change the default with Page.setDefaultTimeout(). See the waitForSelector() API reference.
Common problems and fixes
- The element is still hidden.
setVisibility(null)does not modify page styling. If you need it to become visible, change the page state or its CSS; disabling the locator check alone will not do that. - The action still fails after disabling visibility checks. Visibility is only one possible action precondition. Check whether the element is in the viewport, enabled, and has a stable bounding box, and confirm that the selector identifies the intended element.
- You need to wait for a state before continuing. Use
waitForSelector()with itsvisibleorhiddenoption rather than treatingsetVisibility()as a standalone wait. - An explicit wait times out. The default timeout is 30,000 ms. Verify the selector and expected state, then adjust the timeout with
Page.setDefaultTimeout()if the page legitimately takes longer.
Documentation version
The cited Locator, interactions, and wait-for-selector documentation identifies Puppeteer version 25.12.0. If you use a different release, check its API reference for the applicable signature and defaults. The documented behavior here is not a claim about browser-specific testing.
Rank #3
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Or skip the browser setup
If your goal is a screenshot rather than configuring a Puppeteer interaction, ScreenshotNeo can capture a page through one GET request. It does not set locator visibility or replace Puppeteer automation; it is an alternative for screenshot capture.
Quick Recap
Best Value
Rank #4
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 documentation for request options. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free.
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.




