Use a browser test to open the dropdown the way a user would, assert that it behaves correctly, and then compare a screenshot of the relevant state with a reviewed baseline. With Playwright Test, the core check is await expect(page).toHaveScreenshot(); capture a locator instead when only the menu region matters. Keep the browser and operating environment consistent so rendering noise is less likely to obscure real changes.
Build a test that opens the dropdown before capturing it
A screenshot of a closed page cannot catch changes to an open menu. Make the menu state part of the test: navigate to the page, interact with the trigger, wait for the expected result, assert the important behavior, and capture the intended state.
import { test, expect } from '@playwright/test';
test('dropdown opens and matches its visual baseline', async ({ page }) => {
await page.goto('/settings');
const trigger = page.getByRole('button', { name: 'Account options' });
await expect(trigger).toBeVisible();
await trigger.click();
const menu = page.getByRole('menu');
await expect(menu).toBeVisible();
await expect(menu.getByRole('menuitem', { name: 'Profile' })).toBeVisible();
await expect(page).toHaveScreenshot('account-menu-open.png');
});
This is an illustrative pattern, not a tested example. Replace the URL, accessible name, roles, and expected item with those used by your app. Not every dropdown follows the ARIA menu/menuitem pattern: a native <select>, for example, should be tested using its appropriate control semantics rather than assuming it is a menu.
Choose the right screenshot target
Use a page screenshot when surrounding layout is part of what you need to protect—for example, whether the menu overlaps a heading or is clipped by a container. Use a locator screenshot assertion when the menu’s own appearance is the focus and unrelated page changes would make the test noisy. In either case, retain separate behavior assertions: a visual image alone does not prove that the trigger works or the correct item is available.
#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.
Decide which dropdown states matter
Test the states that are relevant to the component and its users, rather than mechanically testing every possible variation. A useful state matrix might include:
| State | What to exercise and verify |
|---|---|
| Closed | Confirm the trigger is visible and has the expected label or selected value. |
| Open | Open by click or hover as the interface requires; verify the panel and expected options are visible. |
| Selected or expanded | Choose an item or expand a nested option, then assert the resulting value or state. |
| Keyboard and focus | Use the keys the component supports, and verify focus and the resulting open, selected, or closed state. |
| Disabled or error | Include these only if the component has a meaningful disabled or validation state that users need to see. |
| Responsive | Capture at viewports where the menu layout or interaction materially changes. |
If one test moves through several states, take each screenshot at the moment that state exists and give the captures clear, distinct names. Otherwise the final image may show only the last state, leaving earlier visual behavior unprotected.
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.
Hover-open menus
For a menu that opens on hover, use await trigger.hover() instead of clicking, then wait for and assert the open state before capturing. Pointer position is part of the rendered state: Playwright screenshots include hover effects for the pointer’s current location. Move it away when a neutral pointer state is intended, or deliberately place it over the trigger when testing hover styling.
Generate, review, and update baselines
Playwright Test creates a reference screenshot when no baseline exists, then compares later captures with that reference. It retries a screenshot capture until two consecutive screenshots match. Treat the first generated reference as a candidate, not an unquestioned truth: inspect it and commit the approved baseline with the test suite.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated 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 matchRank #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.
- Create the initial reference: run the test in the intended browser and environment, then inspect the generated image to confirm it shows the correct menu state and layout.
- Run the test again: confirm the screenshot comparison is stable before relying on it in CI.
- Review failures: inspect the actual image and diff alongside functional assertion results. Decide whether the change is intentional or a regression.
- Accept an intentional change: run
npx playwright test --update-snapshots, inspect the changed references, and commit only the reviewed updates.
Playwright cautions that rendering can vary with host OS, browser version, settings, hardware, power state, headless mode, and other factors; see its visual comparisons documentation. Generate and compare baselines using consistent browser and host settings instead of treating images from different environments as interchangeable.
Reduce visual noise without hiding regressions
- Wait for a condition, not a guessed delay. Assert that the menu or expected item is visible, and make sure relevant fonts, icons, and data have loaded before capture. A fixed sleep may be too short on one run and needlessly long on another.
- Control pointer state. Playwright’s guidance on hover and pointer positioning is also described in its repository documentation. Use deliberate pointer placement so an accidental hover does not change the image.
- Stabilize genuinely variable content. Timestamps, random values, rotating content, and similar elements can create irrelevant diffs. Playwright supports a screenshot stylesheet through
stylePathto hide or alter volatile elements; see the Page API and visual comparisons guide. - Keep the test subject visible. Do not mask the dropdown or meaningful nearby layout just to make the test pass. That would also mask the very regression the screenshot should catch.
- Adjust thresholds only after diagnosing the diff. Options such as
maxDiffPixelscan help handle understood rendering noise, but a permissive threshold can also conceal a real visual defect. - Keep behavioral checks. Assert visibility, the expected item or selected value, and interaction results independently of the screenshot.
Choose local baselines or hosted visual review
Playwright’s built-in screenshot assertions are a direct option when your team wants reference images within its test project. A hosted workflow may be useful when you need shared visual review, a cloud archive, or capture of intermediate states. Chromatic documents a Playwright setup and targeted snapshots; its visual testing documentation describes its review workflow. Percy provides a Playwright client.
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
Compare these approaches based on where references live, how your team reviews changes, whether you need multiple named states, which browser and platform coverage you require, and the CI setup you can maintain. Current prices and program terms are not established here, so check each vendor’s current terms before choosing a hosted service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
For an individual screenshot of a page state, ScreenshotNeo offers a screenshot API and MCP server. Its API captures a URL; it does not replace the Playwright interaction-and-assertion workflow above when your test needs to open a dropdown or verify behavior. To capture a state, first make it reachable at a URL in your app—for example, through a test-only route—then call the API:
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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/settings?menu=open -o shot.webp
See the ScreenshotNeo documentation for API details. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before the shot; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. 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 ScreenshotNeo’s free 1,000 screenshots a month, with no card required.
Frequently Asked Questions
Can a screenshot test prove that a dropdown works?
No. Keep interaction and accessibility-oriented assertions alongside the visual comparison; the screenshot checks appearance, not behavior by itself.
Should I snapshot the whole page or just the menu?
Choose the smallest area that still includes the layout relationships you need to protect. Use a page capture when surrounding layout matters, and a focused locator capture when unrelated page changes would add noise.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.

