Skip to content

Instantly share code, notes, and snippets.

@myfonj
Created June 2, 2025 11:14
Show Gist options
  • Save myfonj/2a4c4a17a16713210c84f2d1f5a8cc1f to your computer and use it in GitHub Desktop.
Save myfonj/2a4c4a17a16713210c84f2d1f5a8cc1f to your computer and use it in GitHub Desktop.
Start WebKit from Playwright
@echo off
echo Launching Playwright's WebKit browser...
@REM npx playwright install puts executables under
@REM C:\Users\user name\AppData\Local\ms-playwright\webkit-12345\Playwright.exe
set "wkpath=%LOCALAPPDATA%\ms-playwright\webkit-*"
set "wkexe=Playwright.exe"
set "params=%*"
if "%params%"=="" (
set "params=http://localhost/utils/sandbox.html"
)
for /d %%i in ("%wkpath%") do (
if exist "%%i\%wkexe%" (
start "" "%%i\%wkexe%" %params%
goto :eof
)
)
echo "%wkpath%" lacks %wkexe% or does not exist.
echo Have you done the "npx playwright install webkit" yet?
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment