# Send Web Form Automation to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "web-form-automation",
    "name": "Web Form Automation",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/flyingzl/web-form-automation",
    "canonicalUrl": "https://clawhub.ai/flyingzl/web-form-automation",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/web-form-automation",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-form-automation",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/form-submit.js",
      "scripts/webp-compress.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "web-form-automation",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T22:31:32.072Z",
      "expiresAt": "2026-05-17T22:31:32.072Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-form-automation",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-form-automation",
        "contentDisposition": "attachment; filename=\"web-form-automation-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "web-form-automation"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/web-form-automation"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/web-form-automation",
    "downloadUrl": "https://openagent3.xyz/downloads/web-form-automation",
    "agentUrl": "https://openagent3.xyz/skills/web-form-automation/agent",
    "manifestUrl": "https://openagent3.xyz/skills/web-form-automation/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/web-form-automation/agent.md"
  }
}
```
## Documentation

### Web Form Automation

Automate web form interactions reliably using Playwright with best practices for session management, file uploads, and form submission.

### Quick Start

const { chromium } = require('playwright');

// Basic form automation
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
await page.goto('https://example.com/form');

// Upload compressed images
await page.locator('input[type="file"]').setInputFiles('/path/to/image.webp');

// Type text (triggers events properly)
await page.locator('textarea').pressSequentially('Your text', { delay: 30 });

// Submit form
await page.locator('button[type="submit"]').click({ force: true });

### Using Browser Session Data

When user provides a JSON file with session data:

const sessionData = JSON.parse(fs.readFileSync('session.json', 'utf8'));

// Set cookies before navigating
for (const cookie of sessionData.cookies || []) {
  await context.addCookies([cookie]);
}

// Set localStorage/sessionStorage
await page.evaluate((data) => {
  for (const [k, v] of Object.entries(data.localStorage || {})) {
    localStorage.setItem(k, v);
  }
}, sessionData);

### Image Compression

Always compress images before upload for reliability:

# Convert to webp for best compression
convert input.png output.webp

# Or resize if needed
convert input.png -resize 1024x1024 output.webp

Size comparison:

Original PNG: ~4MB
Compressed PNG: ~1MB
WebP: ~30-50KB (99% smaller)

### Upload Sequence

// 1. Find file inputs
const fileInputs = await page.locator('input[type="file"]').all();

// 2. Upload with waiting time
await fileInputs[0].setInputFiles('/path/to/start.webp');
await page.waitForTimeout(3000); // Wait for upload to process

await fileInputs[1].setInputFiles('/path/to/end.webp');
await page.waitForTimeout(3000);

### Use pressSequentially, not fill()

❌ Don't use fill() - doesn't trigger input events:

await textInput.fill('text'); // May not activate submit button

✅ Use pressSequentially() - simulates real typing:

await textInput.pressSequentially('text', { delay: 30 });

### Trigger Events Manually (if needed)

await page.evaluate(() => {
  const el = document.querySelector('textarea');
  el.dispatchEvent(new Event('input', { bubbles: true }));
  el.dispatchEvent(new Event('change', { bubbles: true }));
});

### Force Click When Disabled

If button appears disabled but should be clickable:

await button.click({ force: true });

### Check Button State

const isEnabled = await button.isEnabled();
const isVisible = await button.isVisible();

### Complete Example: Video Generation Form

const { chromium } = require('playwright');
const fs = require('fs');

async function submitVideoForm(sessionFile, startImage, endImage, prompt) {
  const browser = await chromium.launch({ 
    headless: true, 
    args: ['--no-sandbox'] 
  });
  const context = await browser.newContext();
  const page = await context.newPage();
  
  // Load session if provided
  if (fs.existsSync(sessionFile)) {
    const session = JSON.parse(fs.readFileSync(sessionFile, 'utf8'));
    // Set cookies, localStorage...
  }
  
  // Navigate
  await page.goto('https://example.com/video', { 
    waitUntil: 'domcontentloaded' 
  });
  await page.waitForTimeout(3000);
  
  // Upload images (webp compressed)
  const inputs = await page.locator('input[type="file"]').all();
  await inputs[0].setInputFiles(startImage);
  await page.waitForTimeout(3000);
  await inputs[1].setInputFiles(endImage);
  await page.waitForTimeout(3000);
  
  // Select options
  await page.click('text=Seedance 2.0 Fast');
  await page.click('text=15s');
  
  // Type prompt
  const textarea = page.locator('textarea').first();
  await textarea.pressSequentially(prompt, { delay: 30 });
  await page.waitForTimeout(2000);
  
  // Submit
  await page.locator('button[class*="submit"]').click({ force: true });
  
  // Wait and screenshot
  await page.waitForTimeout(5000);
  await page.screenshot({ path: 'result.png' });
  
  await browser.close();
}

### Scripts

The scripts/ directory contains reusable automation scripts:

webp-compress.sh - Convert images to webp format
form-submit.js - Generic form submission template

### Button stays gray/disabled

Wait longer after file upload (3+ seconds)
Ensure text input triggers events (use pressSequentially)
Check if images are still uploading

### Upload times out

Compress images to webp format first
Reduce image dimensions if very large

### Form doesn't submit

Use force: true for click
Check button selector is correct
Verify all required fields are filled
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: flyingzl
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-10T22:31:32.072Z
- Expires at: 2026-05-17T22:31:32.072Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/web-form-automation)
- [Send to Agent page](https://openagent3.xyz/skills/web-form-automation/agent)
- [JSON manifest](https://openagent3.xyz/skills/web-form-automation/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/web-form-automation/agent.md)
- [Download page](https://openagent3.xyz/downloads/web-form-automation)