Play or download any sample. Place it in a videos/ folder, or use your own recording.
You only need these:
Copy sample_pipeline.js from this repo. Rename to pipeline.js if you prefer; the script is the same.
Create a .env file in the same directory as the pipeline script:
# Required: LLM Foundry token
LLMFOUNDRY_TOKEN=your_token_here
# Optional (defaults shown)
MODEL=gemini-2.0-flash
FPS=1
MAX_FRAMES=40
PROJECT=playwright-pipeline
The pipeline uses Gemini via LLM Foundry. Get a token from your provider and set LLMFOUNDRY_TOKEN. Other variables are optional.
Generic, accurate pipeline: video → frames (FFmpeg) → vision + codegen (Gemini) → Playwright spec. Copy the code below into pipeline.js (or sample_pipeline.js) in your project.
Loading pipeline.js…
node sample_pipeline.js videos/video1.webm
video1.webm with your file. Output is written to scripts/video1/video1.spec.js (or the matching name).
npx playwright install --with-deps chromium
npx playwright test scripts/video1/video1.spec.js --browser=chromium --headed