Formbot uses Playwright to automate filling web forms from CSV data.
python -m http.server -b localhost./formbot.py -p -t.5 sample.csv localhost:8000
- Automatic waits for operations with a configurable timeout
- Dynamic action element resolution with a configurable text
- Runs headless or headed with the option to pause once done
- User defined delay
- Handles irregular data and missing values gracefully
- Python 3.9+
- Runtime dependencies:
| Archlinux | Debian (and derivatives, e.g. Ubuntu) |
|---|---|
icu |
libicu74 |
libxml2 |
libxml2 |
libxslt |
libxslt1.1 |
flite |
libflite1 |
harfbuzz-icu |
libharfbuzz-icu0 |
libmanette |
libmanette-0.2-0 |
enchant |
libenchant-2-2 |
hyphen |
libhyphen0 |
woff2 |
libwoff1 |
- Download latest version
unzip formbot-0.1.0.zipcd formbot-0.1.0- Install runtime dependencies (see Requirements)
For convenience, Archlinux users can use arch-deps. e.g.
sudo pacman -Syu $(<arch-deps)
- (optional but recommended) Create a virtual environment:
python -m venv .venv. .venv/bin/activate
- Install Python dependencies:
pip install -r requirements.txt - Install Playwright dependecies:
playwright install - Make script executable (if not already):
chmod u+x formbot.py - Use it (use
./formbot.py -hfor help)
usage: formbot [-h] [--action ACTION] [--pause] [--delay DELAY]
[--timeout TIMEOUT]
csv url
positional arguments:
csv CSV data file
url Web page URL
options:
-h, --help show this help message and exit
--action, -a ACTION Action button name (default: submit)
--pause, -p Run headed browser and pause at the end
--delay, -d DELAY Add delay between submissions in seconds (default: 0)
--timeout, -t TIMEOUT
Time to wait for elements in seconds. Pass 0 to
disable timeout (default: 30)
This project is licensed under the MIT License.
