Building a Bulk Form Submitter with Playwright
说明与用途
使用 Playwright 自动化提交 120 个网站的联系表单,减少手动工作时间。
问题
Submitting a contact form on 120 construction company websites manually was infeasible.
结果
The script automates form submissions across 120 sites, reducing manual effort from hours to minutes.
工作流
- Install Node.js dependencies: npm init -y, npm install playwright axios cheerio xlsx, npx playwright install chromium
- Read list of 120 website URLs
- For each URL: launch browser with Playwright
- Navigate to contact page
- Locate form fields (name, email, message) via selectors
- Fill fields with predefined data
- Submit the form
- Handle popups or cookie banners if present
- Log success or failure
- Close browser
证据
I had a list of 120 construction company websites. For each one, I needed to: Open the contact page, Fill in name, email, and message, Submit the form
First, install the dependencies: npm init -y npm install playwright axios cheerio xlsx npx playwright install chromium
- 记录日期: 2026-10-05T14:11:03.113Z