2.3 KiB
2.3 KiB
name, description
| name | description |
|---|---|
| playwright-blog-automation | Automate personal blog publishing using Playwright with type-based form selectors and text-based navigation. Use when publishing blog posts, logging into the admin panel, creating articles, or automating any blog workflow at http://129.211.173.87:8888/. Triggers on requests like "publish to blog", "post article", "automate blog", or "login to blog admin". |
Playwright Blog Automation
Automate interactions with the personal blog admin panel at http://129.211.173.87:8888/.
When to Use
- Publishing new blog posts
- Logging into the admin panel
- Creating or editing articles
- Automating repetitive blog workflows
- Testing blog functionality
Prerequisites
- Playwright must be installed
- Chromium browser available at
~/.cache/ms-playwright/chromium-1208/chrome-linux64/chrome - Blog credentials: admin/abcd1234
Selector Strategy
Form Inputs:
- Username:
input[type="text"](avoid name-based selectors) - Password:
input[type="password"]
Navigation:
- Navigate to article creation:
button:has-text("写文章")
Actions:
- Login:
button[type="submit"] - Publish:
button[type="submit"]
Automation Steps
- Launch browser using Playwright with the specified Chromium path
- Navigate to http://129.211.173.87:8888/
- Login using type-based selectors for username/password fields
- Navigate to article creation using text-based button selector
- Fill article content (title, body, etc.)
- Publish using submit button selector
- Document each step with screenshots for verification
Output Format
- Screenshot after each major step (login, navigation, form fill, publish)
- Confirmation URL or success indicator
- Error details if any step fails
Example
User request: "Publish a blog post about Python tips"
Workflow:
- Launch Playwright with Chromium-1208
- Goto http://129.211.173.87:8888/
- Fill username:
page.fill('input[type="text"]', 'admin') - Fill password:
page.fill('input[type="password"]', 'abcd1234') - Click login:
page.click('button[type="submit"]') - Click "写文章" button:
page.click('button:has-text("写文章")') - Fill article title and content
- Click publish:
page.click('button[type="submit"]') - Capture confirmation screenshot