You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
# Playwright Form Automation - Page Dumps |
|
|
|
This directory is automatically created by the automation scripts. |
|
|
|
## Contents |
|
|
|
Each dump consists of 3 files with the same timestamp: |
|
|
|
1. **`<prefix>-<timestamp>.html`** - Full HTML content of the page |
|
2. **`<prefix>-<timestamp>.png`** - Full-page screenshot |
|
3. **`<prefix>-<timestamp>-selectors.txt`** - JSON array of all form elements |
|
|
|
## How to Use |
|
|
|
When your script fails or you need to understand page structure: |
|
|
|
1. **Check the screenshot** - Visual representation of what the page looked like |
|
2. **Read selectors.txt** - Find the correct selectors (name, id, class) for form elements |
|
3. **Search HTML** - Deep dive into DOM structure if needed |
|
|
|
## Example |
|
|
|
```bash |
|
# View latest selectors |
|
cat page-dumps/*-selectors.txt | tail -100 |
|
|
|
# Open latest screenshot |
|
xdg-open $(ls -t page-dumps/*.png | head -1) |
|
|
|
# Search for specific field in HTML |
|
grep -i "username" page-dumps/login-*.html |
|
``` |
|
|
|
## Cleanup |
|
|
|
Remove old dumps to save space: |
|
|
|
```bash |
|
# From parent directory |
|
npm run clean-dumps |
|
|
|
# Or manually |
|
rm -rf page-dumps/* |
|
```
|
|
|