If your Playwright screenshot stops at the viewport, enable full-page capture. If the sticky header overlaps content or appears in the wrong place, adjust its CSS specifically for the screenshot. These are separate problems: fullPage changes how much of the page is captured; it does not decide how a sticky header should look.
First, identify what is being cut off
Playwright captures the visible viewport by default. A page screenshot with fullPage enabled captures the full scrollable document. The option does not automatically remove or reposition sticky headers. Decide whether you want the header to remain sticky, become part of the page flow, or disappear.
- The image ends at the viewport height: enable full-page capture.
- The header overlays content or is in the wrong position: use a screenshot-time CSS override.
- You only need a header or another specific area: capture the element or define a clip rectangle.
- The header changes position between captures: control animation and transition behavior.
Capture the full scrollable page
For a full-page image in JavaScript, set fullPage: true on the page screenshot call:
await page.screenshot({ path: 'page.png', fullPage: true });
In Python, the option is named full_page:
await page.screenshot(path='page.png', full_page=True)
Playwright describes this as capturing the full scrollable page “as if you had a very tall screen and the page could fit it entirely.” The option defaults to false. If the page still looks wrong after enabling it, inspect the header’s positioning separately rather than assuming full-page mode will alter the layout. See the Playwright screenshots guide and Page API.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose how the sticky header should appear
Keep the header in normal document flow
If you want the header visible without sticking over the content, add a narrowly targeted CSS rule through the screenshot style option. Replace .site-header with the selector used by your page:
await page.screenshot({
path: 'page.png',
fullPage: true,
style: '.site-header { position: static !important; }',
});
This is an application of Playwright’s screenshot-time stylesheet mechanism, not a dedicated sticky-header setting. Changing positioning can affect page layout, and the result depends on the site’s CSS. Inspect the resulting image and refine the selector or rule if needed.
Remove the header from the image
If the header should not appear at all, try a targeted hide rule:
#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.
await page.screenshot({
path: 'page.png',
fullPage: true,
style: '.site-header { display: none !important; }',
});
Use the actual header selector and check the output: hiding an element can change the page’s layout and the position of other content.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Capture only an element or region
When the desired deliverable is just the header, use a locator screenshot:
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.
await page.locator('.site-header').screenshot({ path: 'header.png' });
To capture a specific rectangular area, use the screenshot clip option with the intended x and y origin and width and height. Element and clip captures solve framing needs; they are not substitutes for full-document capture when you need the entire page. The available screenshot options are documented in the Page API.
Make captures consistent when the header moves
If an animation or transition changes the header’s state during capture, use screenshot animation handling where available, or add a narrow screenshot-time style to suppress the relevant animation. With animations disabled, Playwright fast-forwards finite animations so their transitionend events fire and cancels infinite animations to their initial state during capture; animations resume afterward. This can improve repeatability, but it will not fix a consistently incorrect crop or layout. See the Page API.
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.
For visual regression testing, Playwright Test’s toHaveScreenshot() creates a reference screenshot on first execution and compares later runs. Its style support can filter dynamic or volatile elements. Keep the viewport and page state consistent, and inspect intended changes before updating baselines. Screenshot comparison helps detect differences; it does not by itself correct sticky-header layout. See the visual comparisons guide.
Troubleshoot what remains incomplete
The image ends at the viewport height
Confirm that you used a page screenshot with fullPage: true in JavaScript or full_page=True in Python. Check the specific call that writes the image; enabling the option elsewhere does not change a separate screenshot call.
The header covers content or appears in an unwanted position
Choose whether it should remain sticky, move into normal flow, or be hidden. Apply a targeted rule with style, then inspect the output. There is no dedicated sticky-header switch documented in the reviewed Playwright API material, and a CSS override is not guaranteed to behave identically on every page.
A nested scroll area looks incomplete
Full-page capture refers to the page’s scrollable document. The documented sources do not establish that it expands every nested scroll container. Treat a separately scrollable panel as its own case: capture the container or control its scroll position, then verify the image.
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
Different runs show different header states
Stabilize the page state and handle the relevant animation or transition through screenshot animation options or a narrowly scoped style rule. Keep viewport and page conditions consistent when comparing visual-regression snapshots.
Recommended Free Tools
Or skip the browser setup
ScreenshotNeo can return a website screenshot with one GET request. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000.
For example, with cURL:
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 API options and setup. Sign up for 1,000 free screenshots a month, with no card required.
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.
Frequently Asked Questions
Does Playwright have a dedicated option to disable sticky headers?
No dedicated sticky-header switch is documented in the reviewed API material. Use the screenshot `style` option for a targeted CSS override and inspect the result.
Why is a nested scrollable panel still incomplete in a full-page screenshot?
Full-page capture applies to the page’s scrollable document; the available documentation does not establish that it expands every nested scroll container. Capture or scroll the panel separately and verify the image.
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 errorsQuick 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.




