Free tools Windows power users keep installed
One-click scans. No signup required.
To capture one element, first identify it with a reliable locator, then call an element-level screenshot method. In Playwright, for example, use a locator’s screenshot() method; use the page screenshot method with fullPage: true when you want the whole scrollable page. A locator is not an HTML export: choose the operation that matches the output you need.
Choose what you want to capture
- One element as an image: locate the element and use the automation framework’s element- or locator-screenshot method.
- The whole page as an image: use a page-level screenshot and enable its full-page option when available.
- The element’s markup or text: read its HTML or text content through the framework; a screenshot does not extract markup.
This guide uses Playwright for the runnable screenshot examples. The same locator principles apply in other browser automation frameworks, though their APIs differ.
Pick a locator that identifies the intended element
Prefer selectors that express what a person sees or an explicit testing contract. Playwright recommends role, label, text, alt-text, and test-ID locators, prioritizing user-facing attributes when practical. See Playwright’s locator guidance.
| Target | Useful starting locator | Why |
|---|---|---|
| Button or other control | getByRole() with its accessible name |
Describes the control’s role and user-facing name. |
| Form field | getByLabel() |
Connects the locator to the field’s label. |
| Visible copy | getByText() |
Targets meaningful text when it identifies the intended content. |
| Image | getByAltText() |
Uses the image’s alternative text. |
| Deliberately instrumented test target | getByTestId() |
Uses a test identifier exposed as an explicit contract. |
For example, if the page has one button named “Save,” a role-and-name locator is clearer than a selector tied to the button’s current position in a chain of containers. If the visible name is duplicated, narrow the target to a meaningful section or attribute.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Use CSS or XPath when they express a stable rule
CSS and XPath are useful when there is no suitable semantic locator. Keep selectors focused on meaningful attributes, such as a unique ID or a deliberate data attribute. Avoid long paths that depend on incidental nesting: a redesign can change that structure without changing the element’s purpose.
Selenium’s locator advice is to prefer a unique, predictable ID when one exists, then use a well-written CSS selector if it does not. XPath is supported, but its syntax can be harder to debug. See Selenium’s tips on working with locators.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Check that the locator matches one element
A screenshot of one target should not silently depend on which of several matches happens to come first. Playwright’s single-element actions enforce strictness: if a locator resolves to multiple elements, the action throws rather than choosing arbitrarily. Locators are resolved against the current page when used, which helps when the page re-renders; it does not make an ambiguous or structure-dependent selector reliable.
- Start with the semantic locator or stable attribute that best describes the target.
- If it matches more than one element, scope it to a meaningful parent region or add a relevant attribute.
- Use positional selection such as
first(),last(), ornth()only when position is intentionally part of the rule and remains meaningful as the page changes. - Run the capture after the page reaches the state you intend to document.
For framework details and locator patterns, see the Playwright locator documentation.
Outdated 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 matchPC 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 & 11Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Capture an element or the full page with Playwright
The following example assumes a Playwright test or script has created a page and navigated to the page to capture. It writes a button screenshot and a separate full-page screenshot:
const saveButton = page.getByRole('button', { name: 'Save' });
await saveButton.screenshot({ path: 'save-button.png' });
await page.screenshot({ path: 'full-page.png', fullPage: true });
The first call captures the matched element. The second uses the page-level API; fullPage: true requests the full scrollable page rather than only the currently visible viewport. Check the API documentation for the version you use: Playwright Page API.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
When the goal is HTML rather than an image
Do not use a screenshot call to retrieve markup. Use the framework’s content or evaluation APIs to read the desired element’s HTML or text instead. Keep that extraction separate from visual capture so the output type and scope are unambiguous.
Common locator and capture problems
- The action reports multiple matches: the locator is ambiguous. Scope it to a meaningful parent or add a stable, relevant attribute rather than selecting the first result by habit.
- The locator finds nothing: verify the element is present in the current page state and that the accessible name, label, text, or attribute matches what the page exposes. A page that has not reached the expected state may not contain the target yet.
- A selector breaks after a redesign: replace DOM-position chains with a semantic locator, unique predictable ID, or deliberate test ID when available.
- The image contains only the viewport: use the page-level screenshot’s full-page option if the intended result is the entire scrollable page. An element screenshot and a full-page screenshot have different scopes.
- You received an image but need the source markup: use an HTML or text extraction operation; screenshot APIs return pixels, not DOM serialization.
Or skip the browser setup
For a single element, a browser automation locator gives you precise DOM-level targeting. If you need a clean page screenshot without setting up a browser, ScreenshotNeo accepts a URL in one GET request and can capture a selected element by CSS selector. Its clean-shot flow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; 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 reports the page verdict and billing status in headers.
Example request (replace the URL and API key):
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 the element selector parameter and other options. ScreenshotNeo also has an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Learn more at ScreenshotNeo, or sign up free.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Keep CSS :target separate from capture locators
CSS :target is not a general browser-automation selector. It matches the document element whose ID corresponds to the URL fragment, such as #setup, and is commonly used to style that fragment destination. For example, a URL ending in #setup can make the element with id="setup" match :target. It does not itself take a screenshot or select any arbitrary element for capture. See MDN’s :target reference.
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.




