A repl used to interact with playwright.
git clone https://github.com/jdavis61/playwright-repl.git
cd playwright-repl
npm i
npm run repl -- --headed
npm run repl
Enter these commands into the REPL.
.chromium
await page.goto('https://www.google.com');
await page.screenshot({path: 'google.png'});
Enter these commands into the REPL.
.firefox
await page.goto('https://www.google.com');
await page.screenshot({path: 'google.png'});
Enter these commands into the REPL.
.webkit
await page.goto('https://www.google.com');
await page.screenshot({path: 'google.png'});
Command | Default Value | Description |
---|---|---|
timeout | 3000 ms | Set global timeout |
url | Optional | Pass URL for initial page load |
npm run repl -- --headed --timeout 10000
.webkit
npm run repl -- --headed --url http://127.0.0.1:8080/test.html
.chromium