Skip to content

This Python script automates the process of filling a web form using Selenium.

License

Notifications You must be signed in to change notification settings

TUR14CUS/Form-Filler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Selenium Form Filler

This Python script automates the process of filling a web form using Selenium. The script provides two options for the user: filling the form with existing data or generating fake data and then filling the form.

Table of Contents

  1. Prerequisites
  2. Usage
  3. Important Notes
  4. License

Prerequisites

  • Python: Ensure you have Python installed. You can download it from python.org.

  • ChromeDriver: Download the ChromeDriver executable compatible with your Chrome browser version. You can find it here.

  • Dependencies: Install the required Python packages using the following command:

    pip install selenium pandas faker

Usage

  1. Run the Script:

    Open a terminal and run the script by executing the following command:

    python form_filler.py
  2. Choose an Option:

    The script will prompt you to choose an option:

    • Option 1: Fill the form with existing data from a CSV file.
    • Option 2: Generate fake data, fill the form, and save it to a CSV file.
  3. Provide Input:

    • If you chose Option 1, enter the path to the existing CSV file containing the data.
    • If you chose Option 2, provide the number of fake data entries to generate and the column name for comments.
  4. Enter Details:

    Input the path to the ChromeDriver executable, the URL of the form, and the XPath of the Submit button.

  5. Automated Form Filling:

    The script will launch a Chrome browser, open the specified form, and fill it with the provided data.

Important Notes

  • Ensure that you have a stable internet connection and that the form elements are accessible using the provided XPath.

  • If the form has additional or different fields, adjust the script accordingly.

  • The script will print the columns of the data frame for your reference.

License

This project is licensed under the MIT License.

About

This Python script automates the process of filling a web form using Selenium.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages