This project contains a Python script (iterate-agent.py) that uses Selenium WebDriver to automate filling out and submitting a Google Form repeatedly with random answers.
- Fully automates submitting responses to a Google Form.
- Dynamically scrolls and clicks material UI labels and radio/checkbox options.
- Generates random answers for multiple-choice, checkbox, and text fields.
- Avoids basic bot detection mechanisms (
AutomationControlledflags). - Randomizes delays between submissions to mimic human behavior.
- Python 3.7+
- Google Chrome browser installed.
- (Selenium will automatically download the correct ChromeDriver in newer versions, but if you're on older versions, ensure your ChromeDriver matches your browser version).
It's recommended to run this in a Python virtual environment to avoid dependency conflicts. We have a .venv generated, but if you were doing this from scratch:
python3 -m venv .venv- On macOS/Linux:
source .venv/bin/activate - On Windows:
.venv\Scripts\activate
Install the required packages using the requirements.txt file:
pip install -r requirements.txtIf you want to customize the bot's behavior, you can edit the iterate-agent.py script:
- Target Form URL:
In
fill_form(), modifyform_urlto point to your desired Google Form. - Number of Submissions:
In
main(), locatetarget_submissions = 10and change10to your desired number of total submissions. - Headless Mode (Background):
In
create_driver(), you can uncommentchrome_options.add_argument('--headless')if you prefer the browser does not visibly open on your screen.
Ensure your virtual environment is activated, then run the script:
python iterate-agent.pyTo stop the recurring submissions early at any point, simply press Ctrl + C in your terminal.
This script is provided for educational and testing purposes only. Submitting large volumes of spam to a form violates Google's Terms of Service and might lead to IP-based limitations or blocks.