Python Script to print E-Lab Reports

Being a Python enthusiast and a bit lazy to click on Evaluate button and then Print Report button to print all my Elab reports, idea struck my mind to use Selenium WebDriver API to automate a python script which asks MathsLab No. , Register Number and Password over a python GUI and further prints all reports to a folder created on respective PATH.

What we need :

1. Tkinter – Python module to create GUIs
2. Selenium WebDriver API
3. Chrome Driver or PhantomJS with PATH.
4. Extract web-elements ID’s, X-Paths, ClassName.

How to install Python Modules?
pip install tkinter
pip install -U selenium

How to download Chrome Driver?
Choose your OS. Download and copy its local path and paste in the script.

Steps to run script –

1. Save the script on desktop and open in IDLE or your desired Python editor.

2. Change the path of ChromeDriver with the path of your ChromeDriver
3. Make a folder and copy the path in the script. This is the folder where all prints would be stored.
3. Run the script. ๐Ÿ˜€
4. 1 min 35 sec and its done ๐Ÿ˜€

Code –

My Printed Reports ๐Ÿ˜€

Watch it work ๐Ÿ˜€

Codechef Question Forwarded to Slack

Competitive Programming is the base of computer science as it indicates the efficiency of the code mixed with algorithms and applied mind.

In order to make a practice to solve a competitive programming question every day, I created this python script to send a question from code chef to my slack account every day.

Installation :

1.Selenium WebDriver API
2.Chrome Driver or PhantomJS with PATH
3.Extract web-elements IDโ€™s, X-Paths, ClassName.

How to run theย script?

Link To Script.

1. Save the script on the desktop and open in IDLE.
2. Change the path of ChromeDriver with the path of your ChromeDriver.
3. Enter your Slack API token.
3. Run the script. ๐Ÿ˜€