Setup your python/selenium for Web Automation

Setup your python/selenium for Web Automation

We will discuss how to setup your python/selenium envionrment for web automation. The required package it will need –

  • Python / Python Editor
  • Selenium/Python Library
  • Browser Webdriver


Python Installation

Visit the website to download the python.

Should I download 2.7 or 3.x ?

The key difference are the add-on modules that it may support. Python 3.x may have few python module not supported.

If your automation or system environment are new to python, then it may make no difference.

If you may need to consider existing developed python system, then Python 2.x is recommended.

python download


Installing PIP and Selenium Library

Install the PIP. PIP is the Python Package Installation manager. It will help us to install other Python add-on package easier.

Download the python script here.

Execute the following command in order



This is to install the selenium library by using PIP.

pip install -U selenium

Python Editor IDE

This can be optional. Though you may use any editor (vi or notepad) to edit your python source code, it’s recommended to use a Python IDE.

The Python IDE will help you to do programming easier. i.e. AutoComplete, hint, syntax check..and so on.

There are two free tools recommended here.


Configure Python Interpreter
If you are using PyCharm, follow the configuration to setup Python interpreter once it’s installed.
Python Interpreter Setup


Chrome/IE WebDriver

If you would like to test your web automation for Chrome or IE, the addtional webdriver will need to be downloaded. The webdriver are EXE file which will be used for selenium/Python to launch and talk to browser when running the automation scripts.


IE WebDriver

IE configuration for Selenium/python

If you are planning to test the IE browser with selenium, be sure to config the followings. Fail to do one of these will result in selenium automation testing failure in IE browser.

  • Make sure “Enable Protected Mode” are all the same either on or off for all security zone (Internet, Intranet, Trusted sties, Restricted sites)

  • Make sure the IE zoom setting is set to 100%. Yes it must be exactly 100% not other value.





In summary, the key steps to setup your python/selenium ready are –


Component Noted Source of Download
Python 2.7 is recommended if you are considering the support of add-on.
Python PIP python
Selenium Lib pip install -U selenium
Python IDE PyCharm It’s a Python IDE.
IE/Chrome WebDriver It’s optional. only used if the python automation scripts will executed in IE or Chrome.


Reference of Python WebDriver


Leave a Reply

Your email address will not be published. Required fields are marked *