There are always those days when you just don't feel like waking up for work and logging into your system. This tool is specifically for those who have a online login portal which records the employees login details such as the login time. The tool does the followiong when provided with the right information.
- Executes when PC starts
- Logs into your portal automatically
#Pre-requisite packages NOTE: This tool is only for Ubuntu and also only for those portals that are hosted online.
- Python
- Selenium
pip install selenium
- Enter your portal URL in
loginauto.py
. - Use the Inspect Element feature of your browser to find the name of your ID for each textbox ie. Username and password
- Execute the python file to check if its working or not. Also, change the hour value in the if condition of main(). It is to specify program when not to execute.
- In your terminal go to
~/.config/autostart
. If you don't have the folder called autostart then create one usingsudo mkdir <name>
- In the path
~/.config/autostart
create a file calledloginscript.desktop
- Paste the following code in it. You can open the file using
sudo gedit <filename>
[Desktop Entry]
Encoding=UTF-8
Name=MyScript
Comment=MyScript
Icon=gnome-info
Exec=python <your loginauto.py path>
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=0
NOTE: If you get a geckodriver error then try using these instructions:
First we know that gekodriver is the driver engine of Firefox,and we know that driver.Firefox() is used to open Firefox browser, and it will call the gekodriver engine ,so we need to give the gekodirver a executable permission. so we download the latest gekodriver uncompress the tar packge ,and put gekodriver at the /usr/bin/ ok,that's my answer and i have tested.