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 →The usual way to run Playwright with Vercel is to run your end-to-end tests in CI after a Vercel deployment succeeds, using that deployment’s URL as the test target. Playwright runs in the CI job—not in a Vercel Function. If you mean browser automation performed by your application at runtime, that is a different setup; Vercel documents a hosted-browser integration for that case.
Choose the right Playwright setup
- Test a deployed site: Run Playwright in CI after a Preview or Production deployment is ready. This is the standard workflow for checking a change against its deployed URL.
- Automate a browser from your app: Use a hosted browser service rather than assuming a normal Vercel Function can run your test suite as-is. Vercel documents a Browserless integration for runtime browser automation.
- Develop tests locally: Configure Playwright’s
webServeroption to start your local app before the tests. For deployed testing, point Playwright at the deployment URL instead.
Vercel’s default deployment environments are Local, Preview, and Production. Preview deployments are intended for testing changes before they affect production, and each deployment has its own URL. See Vercel’s deployment environments documentation and its deployment documentation.
Run Playwright after a Vercel deployment
The reliable sequence is to trigger a CI job only after deployment succeeds, check out the revision that produced it, install the project and the matching Playwright browsers, then run tests against the URL supplied by the deployment event. This avoids racing the deployment or accidentally testing a different build.
- Add Playwright configuration and tests to the repository and commit them.
- Configure CI to start after a successful Vercel deployment. Vercel’s guidance describes GitHub Actions
repository_dispatchevents and webhooks for other CI providers; Playwright also documents reacting to GitHub deployment status. - Check out the commit SHA associated with the deployment event, not an unrelated latest branch revision.
- Install locked project dependencies and the Playwright browser binaries plus operating-system dependencies.
- Set the test base URL from the same deployment event, then run
npx playwright test. - If Deployment Protection blocks access, configure Protection Bypass for Automation and pass its secret as a request header, as described below.
Vercel’s example uses a repository-dispatch payload and BASE_URL; Playwright’s example uses GitHub’s deployment_status.target_url and PLAYWRIGHT_TEST_BASE_URL. These are distinct event formats. Use the payload path and variable name belonging to your chosen workflow rather than mixing them. See Vercel’s end-to-end testing guide and Playwright’s CI guide.
#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.
Example GitHub Actions workflow
This example follows Playwright’s deployment-status pattern: the workflow listens for a successful deployment status and uses its target URL. Configure the deployment-status event in your repository so it is emitted for the Vercel deployment you intend to test. Adapt the Node version and dependency installation to the project.
name: Playwright after Vercel deployment
on:
deployment_status:
jobs:
test:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.deployment.sha }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npx playwright install --with-deps
- name: Run Playwright tests against this deployment
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}
run: npx playwright test
Pin action versions according to your organization’s workflow policy. If the repository-dispatch method in Vercel’s guide better fits your event delivery, use that method’s payload and set BASE_URL from its deployment URL instead.
Read the deployment URL in Playwright
Use one environment variable consistently in the test configuration. For example, this Playwright configuration requires the URL to be supplied by CI and prevents silent fallback to an unintended target:
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.
import { defineConfig } from '@playwright/test';
const baseURL = process.env.PLAYWRIGHT_TEST_BASE_URL;
if (!baseURL) {
throw new Error('PLAYWRIGHT_TEST_BASE_URL must point to the Vercel deployment under test');
}
export default defineConfig({
use: {
baseURL,
},
});
Tests can then use relative paths, such as await page.goto('/'). Keep the URL sourced from the event for each run; do not hard-code a Preview URL that changes with subsequent deployments.
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 errorsInstall compatible browsers and dependencies
Playwright browser binaries are tied to the Playwright package version. In CI, install the package from the lockfile and then install browsers for that version. Vercel’s example uses npx playwright install --with-deps, which installs the browsers and required system dependencies on supported Linux runners. If you upgrade Playwright, rerun the browser installation step. See Playwright’s browser installation documentation.
The test runner runs headlessly by default, so a visible desktop is not required in CI. npx playwright test runs the configured test projects. See Playwright’s test CLI documentation.
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.
Let CI reach a protected Preview deployment
Deployment Protection can prevent an automated test from reaching the page. Vercel’s Protection Bypass for Automation is designed for tests, CI/CD pipelines, and monitoring tools. Vercel states that it enables automated tools to access protected deployments without triggering authentication challenges or security blocks. Create the bypass secret in Vercel, store it in your CI provider’s secret storage, and never put it in source control or print it in logs. Details are in Vercel’s Protection Bypass for Automation documentation.
Add the bypass header to Playwright
Configure the request header in the Playwright project. The secret below should be a CI secret, for example a GitHub Actions secret named VERCEL_AUTOMATION_BYPASS_SECRET.
import { defineConfig } from '@playwright/test';
const baseURL = process.env.PLAYWRIGHT_TEST_BASE_URL;
if (!baseURL) throw new Error('PLAYWRIGHT_TEST_BASE_URL is required');
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
export default defineConfig({
use: {
baseURL,
extraHTTPHeaders: bypassSecret
? { 'x-vercel-protection-bypass': bypassSecret }
: {},
},
});
Pass the secret to the workflow step through its env block, referencing your CI secret store. Vercel also documents the optional x-vercel-set-bypass-cookie header, with true and samesitenone values for cases where subsequent browser requests need a bypass cookie. Use it only when the documented cookie behavior is needed for your test context.
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
The bypass covers documented Deployment Protection checks such as Password Protection, Vercel Authentication, and Trusted IPs, along with certain system mitigations and bot-protection challenges. It does not override active DDoS mitigations, attack-time rate limits, or security challenges triggered by attack patterns. Treat it as an automation access mechanism, not as a way to defeat every security control.
Troubleshoot common failures
- The job starts before the page is ready: Trigger tests from a successful deployment event or webhook, and use the URL belonging to that deployment rather than a guessed alias.
- The tests are against the wrong commit: Check out the deployment’s associated SHA and take the URL from the same event. A branch’s newest commit may not be the revision currently deployed.
- Playwright cannot launch a browser: Install the browser binaries and system dependencies with the Playwright version used by the lockfile. Rerun the installation after upgrading Playwright.
- The test sees a Vercel authentication or protection screen: Confirm Protection Bypass for Automation is enabled, the secret is stored in CI, and
x-vercel-protection-bypassis set in Playwright’s request headers. - Initial navigation passes but later requests are blocked: Check whether the documented
x-vercel-set-bypass-cookiebehavior is appropriate for the browser context. - The bypass still does not grant access: Active DDoS mitigations, attack-time rate limits, and some security challenges are outside its scope. Investigate the protection or mitigation state rather than assuming the secret overrides it.
- The local test works but the deployed test fails: Compare the actual deployment URL, environment configuration, authentication state, and availability of test data. A Preview deployment may not have the same environment values or backing services as local development.
If your Vercel app must automate a browser at runtime
This is not the same as running end-to-end tests after deployment. Vercel documents a Browserless integration for hosted headless browsers, set up through Vercel Connect. Its documented flow includes installing @vercel/connect, creating a Browserless connector, and requesting credentials at runtime. Use this architecture when a deployed application needs browser automation as part of its own behavior; it is not a required dependency for the CI test workflow above. See Vercel’s Browserless integration.
For ongoing Playwright testing and monitoring, Vercel also lists Checkly as an integration. It is an adjacent monitoring option, not a prerequisite for running the basic CI workflow. See Vercel’s Checkly integration.
Recommended Free Tools
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.
Or skip the browser setup
If your goal is to capture a page rather than interactively test an application, ScreenshotNeo offers a screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. For example, call the API 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 API documentation for parameters and response details. Unlike a Playwright test, this captures a page; it does not replace assertions, interaction flows, or your end-to-end test suite. ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up free for ScreenshotNeo.
Frequently Asked Questions
Can I run Playwright tests against a Vercel Preview Deployment?
Yes. Trigger CI after the Preview deployment succeeds and pass that deployment’s URL into Playwright as its base URL.
Does the Playwright test runner run inside a Vercel Function in this workflow?
No. In the post-deployment testing workflow, Playwright runs in CI and targets the deployed Vercel URL.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Can Vercel’s automation bypass bypass every security mitigation?
No. Vercel documents exceptions including active DDoS mitigations, attack-time rate limits, and some security challenges triggered by attack patterns.
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.

