This is my B.Tech college(KitsW) Course Exit Survey. Basically, we have to fill out the form after every semester. Usually, it was typing the values from 1-5 but recently, the filling pattern has changed. However, I am too lazy to do it manually, so I automated it.
If you are lazy like me, you can use this script to fill out the form automatically.
Make sure you have Python installed on your system. You can download it from Python's official website.
Download this repository using your preferred method (e.g., zip, ssh, http).
Download the Chrome Driver that matches your Chrome browser version from Here.
It is suggested that you keep the chrome driver in the same directory as the script.
Open this directory in your command-line interface (CLI) or favorite IDE.
sudo apt-get install python-pip
pip install virtualenv
python -m venv .venv
source .venv/bin/activate
pip install virtualenv
python -m venv .venv
.venv\Scripts\activate (or) .venv\Scripts\activate.bat
Run the following command to install the required packages:
pip install -r requirements.txt
Create a file with the name .env
and add your username, password, and chrome driver path like this (do not change variable names in the options_selector_ces.py
):
STORE_YOUR_UNAME = 'your username here'
STORE_YOUR_USERPASSWORD = 'your password here'
STORE_YOUR_PATH_TO_CHROME_DRIVER = 'path to the chrome driver'
If the CES is in the options selecting format, then run the following command to execute the script:
python options_selector_ces.py
it is sometime text based CES, so here is the solution for that.
a = document.querySelectorAll('input');
a.forEach(a => { a.value = 5; });
This will fill all the text boxes with the value 5.
That's it, guys! You have successfully filled the text box with the given text without any stress and manual work.