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.
https://sites.google.com/a/chromium.org/chromedriver/downloads

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 –

https://github.com/pushkalkatara/Python-Selenium-Scripting/blob/master/elab.py


My Printed Reports πŸ˜€

Watch it work πŸ˜€

Advertisements

2 thoughts on “Python Script to print E-Lab Reports

  1. Aayush kumar April 11, 2017 / 2:47 am

    It is great to have a friend like you , we can learn a lot and grow from you and your teaching

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s