Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Set the browser path on the launch call: use executablePath in JavaScript or TypeScript, and executable_path in Python. The path selects an executable for that launch; it does not change where Playwright stores its own browser downloads. Use Playwright’s bundled browser unless you have a specific reason to run another build, because compatibility with arbitrary browser versions is not guaranteed.
Set the executable path when launching a browser
The option belongs to a browser type’s launch() call. Pass an absolute path when possible: it makes the selected executable unambiguous across different working directories and process managers.
JavaScript
Install the Playwright package and its matching browser as appropriate for your project, then launch Chromium with the executable path for your environment:
Free tools Windows power users keep installed
One-click scans. No signup required.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({
executablePath: '/path/to/browser',
headless: true,
});
try {
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
} finally {
await browser.close();
}
})();
Replace /path/to/browser with the executable that exists on the machine running this Node.js process. The example uses Chromium; for Firefox or WebKit, call firefox.launch() or webkit.launch() and provide a compatible executable for that browser type.
#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
TypeScript
The option name is the same in TypeScript. Import the browser type from the Playwright package used by your project:
import { chromium } from 'playwright';
const browser = await chromium.launch({
executablePath: '/path/to/browser',
headless: true,
});
try {
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
} finally {
await browser.close();
}
Python
Python spells the option with an underscore. This synchronous example uses Playwright’s synchronous API:
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch(
executable_path="/path/to/browser",
headless=True,
)
try:
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
finally:
browser.close()
With the asynchronous Python API, use the same keyword argument, executable_path, on await playwright.chromium.launch(...). The option name differs from JavaScript and TypeScript only in its spelling.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC 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 & 11Configure Playwright Test
If you use Playwright Test rather than launching the browser directly in a script, put browser launch options in use.launchOptions in playwright.config.ts. The nested object accepts the launch options supported by browserType.launch().
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
launchOptions: {
executablePath: '/path/to/browser',
},
},
});
This config applies to the test projects that use these settings. Keep the path valid in the environment where the test runner actually runs, including CI workers or containers; a path that exists on a developer laptop does not automatically exist there.
Choose between a bundled browser, a path, and a channel
executablePath is for selecting a particular executable. It can be useful when a project must exercise an installed browser build, but Playwright says it works best with its bundled browser and warns that arbitrary executables may not be compatible with the installed Playwright version. Its API reference advises using executablePath with extreme caution.
| Need | Use | Important distinction |
|---|---|---|
| Run the browser version intended for the installed Playwright package | The bundled browser | Playwright’s version-matched browsers are the most reproducible default. |
| Run a particular executable at a known path | executablePath (JavaScript/TypeScript) or executable_path (Python) |
Relative paths resolve from the Playwright process’s current working directory. Compatibility with arbitrary browser versions is not guaranteed. |
| Run a supported branded Chrome or Edge distribution | The documented channel launch option, such as chrome, chrome-beta or msedge |
A named channel is often a better fit than pointing at an arbitrary executable when the requirement is specifically to use a supported branded browser. |
| Change where Playwright-managed browser binaries are stored | PLAYWRIGHT_BROWSERS_PATH |
This controls Playwright’s browser-binary storage location; it does not select an arbitrary executable or change where Chrome or Edge is installed. |
To select a channel instead of an arbitrary path, use the appropriate launch option, for example await chromium.launch({ channel: 'chrome' }) in JavaScript. Choose a channel listed in the current Playwright API reference for the browser and platform you use; availability can depend on the installed browser and environment.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Executable selection is not browser installation or storage
There are two separate decisions: which executable a launch uses, and where Playwright-managed browser binaries are installed. The launch option handles the first. If you want Playwright to install or find its managed browsers in a shared or local directory, configure PLAYWRIGHT_BROWSERS_PATH for both installation and execution, then install the browser binaries required by your installed Playwright version.
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
Setting PLAYWRIGHT_BROWSERS_PATH=0 opts into a hermetic install in Playwright’s local browser directory. This setting applies to Playwright-managed browsers; it does not relocate an independently installed Google Chrome or Microsoft Edge.
Playwright versions require particular browser binary versions. Installing the matching browsers with npx playwright install is the documented route when you need Playwright’s managed builds. Changing the storage directory alone does not install missing binaries, and pointing executablePath at a different browser does not make that browser version match the Playwright package.
Resolve the path in the process that launches Playwright
An absolute path avoids ambiguity. If you intentionally use a relative path, Playwright resolves it against the current working directory of the process at launch time—not necessarily the directory containing your script or config file.
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 errors- In a local terminal, confirm the current directory and that the path identifies the browser executable.
- In a test runner, container, scheduled job or CI worker, check the filesystem from inside that runtime.
- If different environments have different browser locations, set the path through environment-specific configuration rather than assuming one machine’s path applies everywhere.
The exact executable location varies by operating system, installation method and browser edition. Since no operating system or installation layout is assumed here, use the path that exists in your own runtime rather than copying a platform-specific example.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
Troubleshoot launch failures
When a browser fails to start, first separate path problems from compatibility and environment problems. The browser launch log can help show what Playwright attempted to start.
“Executable doesn’t exist” or a similar missing-file error
- Check spelling, capitalization and file existence in the environment where Playwright runs.
- If the path is relative, resolve it from that process’s current working directory.
- For a container or CI job, verify that the executable is present inside the image or worker, not merely on the host machine.
The file exists, but launch fails
An executable can exist and still be unsuitable: its browser version may not work with the installed Playwright package, or the runtime may lack system dependencies or permissions. Prefer the Playwright-managed browser matching your package version, or choose a supported branded channel if that meets the requirement. A custom path is not a compatibility override.
Find out what Playwright tried to launch
Enable browser launch logging with DEBUG=pw:browser in the environment that starts Playwright, then rerun the failing command and inspect the emitted launch information.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →# macOS or Linux shell
DEBUG=pw:browser npx playwright test
# Windows PowerShell
$env:DEBUG = 'pw:browser'
npx playwright test
Use the same setting with your own test or application command if you do not use Playwright Test. Once debugging is done, remove the variable or unset it; it is a diagnostic setting, not a browser-path configuration.
Best Value
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
You meant to move Playwright’s downloaded browsers
Do not substitute a custom executable path for a storage setting. Configure PLAYWRIGHT_BROWSERS_PATH consistently when installing and running Playwright, then install the binaries needed by the current package. If you set it to 0, verify that the hermetic browser directory is populated for the runtime that launches your code.
Or skip the browser setup
If the job is to get a website screenshot rather than control a browser session, ScreenshotNeo can return a screenshot from one request. See the ScreenshotNeo API documentation for its request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://playwright.dev -o shot.webp
ScreenshotNeo removes cookie and consent banners, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides 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 shots. Sign up for free.
Performance, reliability and cost considerations
Using an installed executable does not by itself establish that launches will be faster or cheaper. Startup time, browser caching, installed dependencies, network conditions and the selected browser build all affect the result; no universal performance gain follows from setting the path.
For repeatable automation, the bundled browser plus the matching Playwright version reduces version drift. If a project requires a specific browser build, pin and verify that build in every environment where tests run. In CI, the browser path and required runtime dependencies must be available to the worker, and failures should be investigated with the launch logs rather than solved by changing paths at random.
There is no additional Playwright fee implied by the option itself. Operational costs depend on how browsers are provisioned and run in your environment; this configuration alone does not specify an installation, hosting or CI cost.
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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →

