playwright-skill
Automate browser tasks with Playwright
متاح أيضًا من: lackeyjb
This skill enables Claude Code to automate browser interactions using Playwright, handling dev server detection, test script execution, and comprehensive web testing capabilities.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "playwright-skill". Test my local app at localhost:3000
النتيجة المتوقعة:
Auto-detected dev server on port 3000. Launching browser to test...
Page title: My Web App
Viewport: 1280x720
✓ Page loaded successfully
✓ No console errors detected
✓ Screenshot saved to /tmp/screenshot-2024-01-15.png
استخدام "playwright-skill". Check responsive design
النتيجة المتوقعة:
Testing across viewports:
- Mobile (375x667): ✓ No layout issues
- Tablet (768x1024): ✓ No layout issues
- Desktop (1280x720): ✓ No layout issues
All viewport tests passed. Screenshots saved to /tmp/
التدقيق الأمني
مخاطر منخفضةThis is a legitimate browser automation skill using the Playwright library. The static analyzer flagged many patterns but most are false positives: shell commands in documentation are usage examples, not dangerous execution; network access is required for browser automation; filesystem access is for writing test scripts to /tmp; environment variables are for configuration. No malicious intent detected.
مشكلات متوسطة المخاطر (1)
مشكلات منخفضة المخاطر (2)
عوامل الخطر
⚙️ الأوامر الخارجية (1)
🌐 الوصول إلى الشبكة (1)
📁 الوصول إلى نظام الملفات (1)
🔑 متغيرات البيئة (1)
⚡ يحتوي على سكربتات (1)
درجة الجودة
ماذا يمكنك بناءه
Web Developer Testing
Test web applications locally by auto-detecting dev servers and running automated browser tests across multiple viewport sizes.
QA Automation
Create end-to-end tests for web applications, validate login flows, and check responsive design across different devices.
Web Scraping
Extract content from websites that require JavaScript rendering, including screenshots and structured data extraction.
جرّب هذه الموجهات
Test my local web application. First detect any running dev servers, then verify the main page loads correctly and check for console errors.
Check if my web application looks good on mobile, tablet, and desktop viewports. Take screenshots at each size and report any layout issues.
Test the login flow on [URL]. Fill in the credentials, click login, and verify successful authentication by checking for dashboard or user menu.
Fill out and submit the contact form on [URL] with test data. Verify the form submits successfully and check for any validation errors.
أفضل الممارسات
- Always use parameterized URLs via constants or environment variables for maintainability
- Write test scripts to /tmp to keep project directories clean
- Use visible browser mode (headless: false) for debugging, switch to headless for CI
- Handle async operations properly with waitForSelector and waitForNavigation
تجنب
- Do not hardcode credentials in test scripts - use environment variables instead
- Avoid testing against production websites without authorization
- Do not rely solely on sleep/timers - use proper wait conditions for reliable tests
- Avoid writing test files to the skill directory - always use /tmp