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 →In Java Playwright, use Page.screenshot() to save a search-results page, adding setFullPage(true) for the full scrollable page. Use Locator.screenshot() to capture one result card. These APIs capture what the browser displays; they do not grant permission to automate Amazon.in, Flipkart, or another live marketplace. Use an authorized test page or get permission first.
Before capturing a live marketplace
Playwright documents browser screenshot mechanics, not permission to collect data from a marketplace. Amazon India’s Site Terms restrict use of data-mining, robots, or similar data-gathering and extraction tools, among other uses. Flipkart’s Terms of Use prohibit using automated devices and similar processes to access, acquire, copy, or monitor website content, subject to the terms’ wording.
Those terms do not establish an exception or authorization for a particular test. For implementation, use a local or otherwise authorized test fixture. Before automating a live page, verify the current terms that apply to your use and obtain any required permission. No live marketplace page or selector is verified here.
Set up a Java Playwright capture
The examples below use the Playwright Java API. They assume you already have a configured Java project with Playwright installed and a browser available. The official Playwright Java screenshot guide documents the screenshot calls used here.
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.
Capture a full scrollable page
Navigate to an authorized search-results page, wait for a results locator that is appropriate to that page, then save the screenshot. Replace the example URL and selector with values from your permitted test environment; selectors are site-specific.
import com.microsoft.playwright.*;
import java.nio.file.Paths;
public class SearchScreenshot {
public static void main(String[] args) {
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.chromium().launch();
Page page = browser.newPage();
page.navigate("https://example.com/search?q=shoes");
Locator results = page.locator("[data-testid='search-results']");
results.waitFor();
page.screenshot(new Page.ScreenshotOptions()
.setPath(Paths.get("search-results.png"))
.setFullPage(true));
browser.close();
}
}
}
setFullPage(true) asks Playwright to capture the entire scrollable page rather than only the visible viewport. A page can still change while loading; waiting for the relevant result region helps avoid capturing before it appears, but it does not guarantee that every image or dynamic component has finished rendering.
Capture one product result
When the question is about a particular card rather than the whole layout, locate the card and call screenshot() on that locator:
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.
Locator resultCard = page.getByRole(AriaRole.LISTITEM)
.filter(new Locator.FilterOptions().setHasText("Example product name"));
resultCard.waitFor();
resultCard.screenshot(new Locator.ScreenshotOptions()
.setPath(Paths.get("product-result.png")));
The selector strategy depends on the page’s accessible structure. Prefer meaningful locators such as role, text, label, placeholder, alt text, or test ID, then narrow the match with text or an identifying child where needed. Confirm that your locator matches exactly the intended item. An element screenshot uses the matched element’s bounds; if that element itself scrolls, the screenshot shows only its currently scrolled content.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose locators and waits that fit the page
Search-result pages often render asynchronously. A locator-based wait ties the capture to the region you need rather than relying only on an arbitrary delay. For example, in an authorized fixture, wait for a results container or a specific card before taking the screenshot. Playwright locators provide auto-waiting behavior for locator actions, but a site-specific selector and the right readiness condition remain your responsibility.
Use locators that are stable in your test environment. If a result card has a test ID, that can be less fragile than a generated CSS class. If the page exposes semantic list items, a role locator filtered by the product text can express intent more clearly. Avoid assuming that one selector works across Amazon.in, Flipkart, or different versions of either site.
Rank #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.
Set screenshot options for useful comparisons
Keep capture settings consistent when images will be compared over time or across queries. Playwright’s screenshot options control coverage, scale, format, masking, styling, and animations.
| Option | Use | Comparison consideration |
|---|---|---|
setFullPage(true) |
Capture the whole scrollable page. | Use it when page length and placement matter; use a locator screenshot when only a result card is relevant. |
setClip(...) |
Capture a specified rectangle. | Keep the rectangle and coordinate basis consistent between captures. |
setScale(...) |
Choose CSS-pixel or device-pixel output. | Keep device scale consistent so output dimensions are comparable. |
setType(...) |
Choose PNG, JPEG, or WebP output. | Use the same format when comparing files; lossy formats can change image details. |
setMask(...) |
Cover selected locator bounds in the screenshot. | Mask only content that should be excluded from review; masking changes what the image communicates. |
setStyle(...) |
Apply screenshot-specific CSS to hide or adjust dynamic elements. | Document any style changes because they alter the captured page. |
setAnimations(...) |
Control CSS and Web Animations while the screenshot is taken. | Disabling animations can reduce variation from motion during capture. |
For a reproducible comparison, record the marketplace and query, viewport and device scale, page state and result region, capture time, and whether the image is a full-page or element capture. Preserve labels and positions that distinguish sponsored placements from organic results if those distinctions are part of the analysis.
Save bytes for downstream processing
If your pipeline needs to process the image rather than immediately write it to a file, the page screenshot API can return a byte[]:
byte[] image = page.screenshot(new Page.ScreenshotOptions()
.setFullPage(true));
You can pass that byte array to your own permitted image-processing or storage code.
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
Why sponsored placements need context
A 2024 study of grid-based search results on Amazon.in and Flipkart reported that Amazon private-label products occupied 11.7% of ad spaces across its sampled Amazon search-result pages; for sampled first Amazon search-result pages, the reported share was 15.16%. The study also included a survey of 68 participants. These are findings from the study’s collected snapshots and survey, not measurements of current marketplace pages. See the 2024 study on arXiv.
If your purpose is to examine search-result placement, capture enough surrounding page context to distinguish sponsored listings from organic results and to identify the query. A crop that isolates a product card may be useful for visual inspection but can discard that placement context.
Free tools Windows power users keep installed
One-click scans. No signup required.
Or skip the browser setup
ScreenshotNeo provides a screenshot API and MCP server. Its API can return a screenshot or PDF from one GET request. For example, this cURL call saves an image for a URL you are authorized to capture; see the ScreenshotNeo documentation for API options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/search?q=shoes -o shot.webp
ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and 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 1,000 free screenshots a month with no card.
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.
Troubleshoot common capture problems
- The image is blank or misses results: The page may not have rendered the result region when the capture ran. Wait for a relevant locator in your authorized test page, and check that the selector matches an element that actually appears.
- The locator does not match or matches multiple cards: Inspect the test page’s accessible structure and refine the locator with a role, text, test ID, or identifying child. Do not assume a selector from one marketplace page applies elsewhere.
- A card image is cut off: The element screenshot captures the locator’s bounds; a scrollable element shows its currently scrolled content. Use a full-page capture if the whole layout matters, or ensure the target element is not internally scrolled when capturing it.
- Images differ between runs: Keep viewport, device scale, query, page state, result region, format, and capture time recorded. Consider screenshot styling or animation control for dynamic content, and note any changes those settings make to the image.
- A live marketplace blocks or challenges the browser: Do not try to bypass the control. The terms may restrict automated gathering; use an authorized fixture or obtain permission for the intended activity.
Frequently Asked Questions
Can I save a Playwright screenshot as a byte array instead of a file?
Yes. Page.screenshot() can return a byte[] for downstream processing.
Recommended Free Tools
Does an element screenshot include the entire contents of a scrollable result panel?
It captures the element’s bounds and only the currently scrolled content of a scrollable element.
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.

