This is a simple Python script for automating form filling using Selenium.
This script utilizes the Selenium library to automate the process of filling out a form on a web page. It interacts with the web page elements by locating them using CSS selectors and enters data into the corresponding input fields. The script fills out various fields such as email, name, checkbox, phone number, and textarea. Finally, it clicks on the agree button and closes the web driver.
Before running this script, make sure you have the following requirements:
- Python installed on your system
- Selenium library installed (
pip install selenium
) - Chrome browser installed
- ChromeDriver executable compatible with your Chrome browser version. You can download it from the ChromeDriver website.
- Clone the repository or download the script file:
git clone https://github.com/your-username/your-repo.git
- Install the required dependencies:
pip install selenium
- Download the appropriate ChromeDriver executable and ensure it is in your system's PATH.
- Open the script file (
script.py
) and modify the values of the input fields according to your requirements. - Run the script:
python script.py
- Sit back and watch as the form is automatically filled and submitted.
- Make sure you have a stable internet connection while running the script.
- Adjust the CSS selectors if the structure of the web page changes.
- This script assumes you are using Chrome as your browser. If you prefer a different browser, you need to download the respective driver and update the code accordingly.
This project is licensed under the MIT License. Feel free to modify and distribute this code as needed.