プレイグラウンド、サンドボックス、使い捨てスクリプト置き場
0

Configure Feed

Select the types of activity you want to include in your feed.

create deno-playwright

Kohei Watanabe (Oct 29, 2024, 2:44 PM +0900) 75ba1867 d314e83b

+44
+4
deno-playwright/README.md
··· 1 + ``` 2 + $ deno -A npm:playwright install 3 + $ deno -A main.ts 4 + ```
+5
deno-playwright/deno.json
··· 1 + { 2 + "imports": { 3 + "playwright": "npm:playwright@^1.48.2" 4 + } 5 + }
+27
deno-playwright/deno.lock
··· 1 + { 2 + "version": "4", 3 + "specifiers": { 4 + "npm:playwright@*": "1.48.2", 5 + "npm:playwright@^1.48.2": "1.48.2" 6 + }, 7 + "npm": { 8 + "fsevents@2.3.2": { 9 + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==" 10 + }, 11 + "playwright-core@1.48.2": { 12 + "integrity": "sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==" 13 + }, 14 + "playwright@1.48.2": { 15 + "integrity": "sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==", 16 + "dependencies": [ 17 + "fsevents", 18 + "playwright-core" 19 + ] 20 + } 21 + }, 22 + "workspace": { 23 + "dependencies": [ 24 + "npm:playwright@^1.48.2" 25 + ] 26 + } 27 + }
+8
deno-playwright/main.ts
··· 1 + import { chromium } from "npm:playwright"; 2 + 3 + const browser = await chromium.launch({ headless: false }); 4 + const page = await browser.newPage(); 5 + 6 + await page.goto("https://example.com"); 7 + await new Promise((r) => setTimeout(r, 10_000)); 8 + await browser.close();