Free tools Windows power users keep installed
One-click scans. No signup required.
Use a normal CSS descendant selector: place the ancestor selector first, add a space, then select the descendant and put its attribute test on that element. For example, div.card a[href^="/products/"] finds links at any nesting depth inside div.card whose href starts with /products/. For clicks and other interactions, Puppeteer’s locator API is usually the best choice because it waits for an actionable element.
The selector pattern
The general form is:
ancestor-selector descendant-selector[attribute-condition]
The space is the descendant combinator. It allows any number of intermediate elements. The attribute condition is ordinary CSS syntax, not a separate Puppeteer option.
const productLink = page.locator('div.card a[href^="/products/"]');
await productLink.click();
This matches an < a > anywhere inside a matching < div class="card" >, including through wrappers such as <div> or <li>. The ^= operator limits matches to href values beginning with /products/.
#1 Best Overall
- FULL HD IPS DISPLAY - Enjoy vibrant, crystal-clear images with 178-degree wide-viewing angles
- AMD RYZEN 3 30 PROCESSOR - Everyday performance you can count on; Multitask, stream, game casually, and edit photos smoothly with responsive power and vibrant HDR visuals
- ENJOY UP TO 14 HOURS AND 15 MINUTES OF BATTERY LIFE - HP Fast Charge restores battery from 0 to 50% in approximately 45 minutes
- AMD RADEON 610M GRAPHICS - Experience smooth entertainment; Built for streaming and multitasking, enjoy realistic visuals and efficient performance for work and play
- STORAGE AND MEMORY - 512 GB PCIe NVMe M.2 SSD offers fast speed and efficient storage; and 8 GB LPDDR5 RAM memory boosts performance with higher bandwidth
Descendant versus direct-child selectors
Use a space for any depth
section article a[data-id]
This can match an anchor nested several levels below section, provided an article occurs in the chain.
Use > only for immediate children
section > article > a[data-id]
Every relationship in this selector must be direct. If a wrapper is inserted between article and a, it no longer matches. Prefer the space when your requirement is simply “somewhere inside”; use > when the DOM structure itself is part of the contract.
A common typo
div.card a[href] means an anchor descendant of a div.card. By contrast, div.carda[href] describes one element named div with class names that do not mean what the author probably intended. Keep selector components visually separated.
Attribute selector operators you can use
Put the test on the element whose attribute matters. These are standard CSS attribute selectors:
Recommended Free Tools
| Syntax | Meaning | Example |
|---|---|---|
[data-action] |
Attribute exists | main button[data-action] |
[data-action="save"] |
Exact value | form.settings button[name="save"] |
[href^="/docs/"] |
Value begins with text | nav a[href^="/docs/"] |
[href$=".pdf"] |
Value ends with text | main a[href$=".pdf"] |
[class*="warning"] |
Value contains text | section [class*="warning"] |
[class~="selected"] |
Whitespace-separated token | ul li[class~="selected"] |
[lang|="en"] |
Exact value or value beginning with that value plus a hyphen | article [lang|="en"] |
Quote values when they contain punctuation, spaces or characters that could be interpreted as selector syntax. If a value is dynamic or untrusted, escape it according to CSS rules rather than concatenating raw text into a selector.
Rank #2
- Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.
- 14" HD Display: 14.0-inch diagonal, HD (1366 x 768), micro-edge, anti-glare. See your digital world in a whole new way. Enjoy movies and photos with the great image quality and high-definition detail of 1 million pixels.
- Memory & Storage: 4 GB LPDDR4x & 64 GB eMMC Storage. Adequate high-bandwidth RAM to smoothly run multiple applications and browser tabs all at once. An embedded multimedia card provides reliable flash-based storage.
- Ports:2 x USB 3.0 Type-A,1 x USB 3.0 Type-C,1 x HDMI,1 x Headphone Jack
- Chrome OS: Chromebook is a computer for the way the modern world works, with thousands of apps. Enjoy the seamless simplicity that comes with Google Chrome and Android apps, all integrated into one laptop. It’s fast, simple, and secure.
Choose the Puppeteer query API by result shape
Locators for actions
page.locator(selector) is the recommended interaction style in the current Puppeteer guide. A locator waits for the element and checks action preconditions such as visibility, enabled state and a stable bounding box before clicking or typing.
const save = page.locator('form.settings button[name="save"]');
await save.click();
$ for one element
page.$(selector) resolves to the first matching element handle or null when there is no match at query time.
const first = await page.$('ul.results li[data-state="active"] a');
if (!first) throw new Error('No active result link found');
$$ for all elements
page.$$(selector) returns all matching handles, or an empty array.
const docs = await page.$$('nav a[href^="/docs/"]');
for (const link of docs) {
await link.click();
}
$eval and $$eval for extraction
$eval passes the first match to a page function and throws if none exists. $$eval passes all matches to the function.
const title = await page.$eval(
'article[data-id="42"] h1[data-role="title"]',
el => el.textContent?.trim()
);
const labels = await page.$$eval(
'ul.results li[data-state="active"] a',
links => links.map(link => link.textContent?.trim())
);
Complete examples
Click a descendant with an exact attribute
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/settings', {waitUntil: 'networkidle2'});
const save = page.locator('form.settings button[name="save"]');
await save.click();
await browser.close();
Collect links whose attribute has a prefix
const links = await page.$$eval(
'nav a[href^="/docs/"]',
anchors => anchors.map(a => ({
text: a.textContent?.trim(),
href: a.getAttribute('href')
}))
);
console.log(links);
Require an immediate child
const firstItem = page.locator(
'ul.results > li[data-state="active"]'
);
await firstItem.click();
Waiting, timing and failure behavior
CSS matching only describes what is in the DOM when the query runs. A page that renders results later can legitimately produce null or an empty array with $ or $$. For an interaction that should wait, use a locator and navigate or wait for the relevant state before acting.
Rank #3
- Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
- Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
- AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
- All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
- Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.
- Use
page.goto(url, {waitUntil: 'networkidle2'})when waiting for a relatively quiet network is appropriate. - Use a locator when the element may be inserted after navigation.
- Use explicit application signals, such as a result container or status attribute, rather than assuming network idle means the UI is complete.
- Check for
nullwith$, and handle empty arrays from$$before dereferencing elements.
Shadow DOM boundaries
Ordinary CSS descendant selectors do not cross a shadow root. If the target is inside an open shadow tree, Puppeteer documents the >>> deep descendant combinator for traversing that boundary.
const button = page.locator(
'user-card >>> button[data-action="save"]'
);
await button.click();
Do not add >>> to ordinary document markup. First confirm that the element is actually inside an open shadow root; a closed shadow root cannot be selected this way.
Troubleshooting checklist
“No element found” or a null handle
- Verify the ancestor and descendant tags/classes separately in DevTools.
- Check that the attribute is on the target element, not its parent.
- Replace
>with a space if wrappers may occur. - Wait for the page’s render condition before querying.
The selector matches too many elements
- Add a stable ancestor, an exact attribute value or a more specific class.
- Use
>when only direct children are valid. - For one result, select a unique identifier rather than relying on position.
The selector works in the document but not in a component
Inspect shadow roots. Use the deep combinator for open roots, or expose a test hook outside the shadow boundary if the component is under your control.
Dynamic values break the selector
Quotes, brackets and other CSS-significant characters must be escaped. Avoid inserting arbitrary user input directly into a selector; validate or escape it first.
$eval throws unexpectedly
Unlike a locator, $eval requires a match immediately. Use a locator for an action that should wait, or test the result of $ before extracting.
Rank #4
- Efficient Performance for Everyday Computing: Powered by Intel N150 processor with up to 3.6 GHz Intel Turbo Boost Technology, 6 MB L3 cache, 4 cores, and 4 threads, this HP laptop delivers responsive performance for web browsing, streaming, document editing, and multitasking. Paired with 4GB LPDDR5 RAM and 128GB UFS storage, it handles daily tasks smoothly. Includes 1-year Microsoft 365 Personal subscription for Word, Excel, PowerPoint, and cloud storage to maximize your productivity.
- 14-Inch HD Micro-Edge Display:Enjoy clear visuals on the 14-inch HD (1366 x 768) anti-glare screen with 250-nit brightness and 62.5% sRGB coverage. The micro-edge bezel delivers a 79% screen-to-body ratio in a compact design. An HP True Vision 720p HD camera with noise reduction and dual-array microphones supports clear video calls, remote work, and online learning.
- Modern Connectivity and Wireless Technology: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.4 for seamless pairing with accessories. Versatile port selection includes 1 USB Type-C 10Gbps with DisplayPort 1.2 for external displays, 2 USB Type-A 5Gbps ports for peripherals, 1 HDMI 1.4b port, 1 headphone/microphone combo jack, and 1 multi-format SD media card reader. Connect monitors, transfer files quickly, and expand your workspace with ease.
- All-Day Battery Life and Portable Design: Enjoy up to 11 hours of video playback, 7.5 hours of mixed usage, or 7.5 hours of wireless streaming on a single charge, perfect for students and professionals on the go. Weighing just 3.24 lb and measuring 12.76" x 8.86" x 0.71", this lightweight laptop fits easily in backpacks and bags. The stylish willow green top cover with matte finish and natural silver keyboard deck with vertical brushing pattern offer a modern, professional look.
- AI-Enhanced Productivity: Access Microsoft Copilot instantly with the dedicated Copilot key for faster assistance. AI Noise Reduction filters background sounds and improves voice clarity during calls. Dual speakers provide clear audio, while the full-size natural silver keyboard and HP Imagepad support comfortable typing and navigation.
Performance and maintainability
Start with a selector that expresses the relationship the page promises: a stable ancestor plus a meaningful attribute. Broad selectors such as body [data-id] can scan many nodes and are fragile when unrelated components reuse the same attribute. Stable data-* hooks are generally easier to maintain than presentation classes.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsKeep selectors readable and centralize repeated selectors in constants. If a site redesign changes wrappers, descendant selectors usually survive where strict child chains fail. If the nesting itself is semantically important, retain the child combinator and let a failing test expose that contract.
Or skip the browser setup
If your goal is a clean image or PDF rather than DOM interaction, ScreenshotNeo provides a website screenshot API and MCP server. Its GET endpoint accepts a URL and returns PNG, JPEG, WebP or PDF. Before capture it can accept cookie/consent banners and remove more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled.
Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP tools—take_screenshot, get_page_info and capture_pdf—let Claude, Cursor and other MCP clients request captures.
See the ScreenshotNeo documentation for all options. A one-call cURL example:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The equivalent Python request:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Features include full-page and element capture, 12 device presets or custom viewports, retina scale, dark mode, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, chosen-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting and an OpenAPI specification. Existing parameter names used by other screenshot APIs also work.
Best Value
- Designed for mobility with a slim 0.71-inch profile and lightweight 3.24 lb chassis, making it easy to carry between home, office
The Free plan includes 1,000 shots per month without a card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free. Create a free ScreenshotNeo account to try it.
Version note
The cited official references surfaced Puppeteer 25.12.0 for the interactions, $ and $eval pages, and 25.11.0 for $$. Selector behavior is standard CSS, but Puppeteer APIs are version-sensitive, so check the guide and API reference for the version installed in your project.
Frequently Asked Questions
Can I combine several attribute conditions?
Yes. Chain them on the same element, for example button[data-action="save"][aria-disabled="false"], while retaining the ancestor and descendant relationship before the button.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →How do I select a descendant by its visible text?
CSS attribute selectors do not match rendered text. Query a stable element or attribute, then inspect its textContent, or use Puppeteer’s locator text facilities where supported by your installed version.
What does an empty result from $$ mean?
It means no matching elements existed at the instant the query ran. Check timing, selector spelling, frames and shadow-root boundaries before changing the selector.
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.




