enact/playwright
スクリーンショットのキャプチャとWebコンテンツの抽出
ブラウザ自動化は、テスト、データ抽出、視覚的検証に不可欠です。このスキルは、Playwrightを使用して、任意のWebページからスクリーンショットをキャプチャし、テキストやHTMLコンテンツを抽出する信頼性の高い方法を提供します。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "enact/playwright". Take a screenshot of https://example.com
Résultat attendu:
- Starting Playwright...
- URL: https://example.com
- Action: screenshot
- Selector: body
- Using browser at: /ms-playwright/chromium-XXXX/chrome-linux/chrome
- Navigating to https://example.com...
- Page loaded successfully
- SCREENSHOT_START
- [base64-encoded-image-data]
- SCREENSHOT_END
Utilisation de "enact/playwright". Get the text from the heading on https://example.com
Résultat attendu:
- Example Domain
Utilisation de "enact/playwright". Extract the HTML from the main content on https://example.com
Résultat attendu:
- <div>
- <h1>Example Domain</h1>
- <p>This domain is for use in illustrative examples...</p>
- </div>
Audit de sécurité
Risque faibleStatic scanner flagged 16 potential issues, but all findings are false positives. The code uses safe JavaScript template literals for logging (not shell backticks), empty string fields (not weak crypto), and standard fs operations for legitimate browser path detection. The skill is a standard Playwright browser automation tool with no malicious patterns.
Problèmes à risque moyen (2)
Facteurs de risque
🌐 Accès réseau (3)
Motifs détectés
Score de qualité
Ce que vous pouvez construire
ビジュアル回帰テスト
Webページのスクリーンショットをキャプチャし、ベースライン画像と比較してビジュアル回帰テストを行います。
分析のためのコンテンツ抽出
WebページからテキストまたはHTMLコンテンツを抽出して、下流の処理や分析に使用します。
ドキュメンテーションとレポート作成
ドキュメンテーション、レポート、またはプレゼンテーションのためにWebページのスクリーンショットをキャプチャします。
Essayez ces prompts
Take a screenshot of https://example.com
Get the text content from the main heading on https://example.com using the selector 'h1'
Extract the HTML content of the article section from https://example.com/blog/article
Take a screenshot of the product gallery on https://example.com/shop/product using selector '.product-gallery'
Bonnes pratiques
- 抽出する正確な要素をターゲットにするために、特定のCSSセレクターを使用する
- スクリーンショットをbase64エンコードされた文字列として処理し、Transmissionを容易にする
- 読み込みが遅いページに適切なタイムアウト値を設定する
- リソースリークを防ぐために、try-finallyブロックでブラウザを適切に閉じる
Éviter
- このスキルを、自動アクセスを禁止しているWebサイトのスクレイピングに使用しない
- 機密情報や個人情報を含むページのスクリーンショットをキャプチャしない
- ユーザーシミュレーションが必要なインタラクティブなWebテストには頼らない
- 適切な認証情報なしで、認証の背後にあるページからコンテンツを抽出しない