Steps to get your Python/Selenium Testing Environment Ready

Steps to get your Python/Selenium Testing Environment Ready

This article we will give step by step guide to setup your own python / selenium testing environment. The Key steps are –

1. Installation Python & PIP

2. Installation Selenium Library

3. Installation Python IDE

4. Reference list

Installing Python

Python can be downloaded and installed here.   http://python.org/download/

  • For Mac/Linux machines, the step may be skipped.
  • Install Python 2.7 or Python 3.0?  If it’s a new python development work, go for Python 3.0. If there are some existing work developed previously in python, then go for Python 2.7. It’s because Python 2.7 still supports all of the plug-in modules which Python 3.0 may not.

 

Environment Path

Assume you install the python under the folder “python27”, you may configure the environment path as –

  • My Computer ‣ Properties ‣ Advanced ‣ Environment Variables
  • Path = c:\python27;c:\python27\Scripts

https://docs.python.org/2/using/windows.html

Installing Python PIP

Download the “get-pip.py” https://bootstrap.pypa.io/get-pip.py

Then, execute the command under console. This will install the PIP module for python. The PIP will allow us to install further python module package easier.

Python   get-pip.py

Installing Selenium

Once the pip and python were installed, then execute the PIP.exe under the c:\python27\Scripts.

pip     install -U selenium

the PIP will download and install the whole selenium for the python.

However, if you don’t have PIP module. Alternatively, you may also download the selenium python here. https://pypi.python.org/pypi/selenium.

Then, execute the setup.py after you download the selenium.

python   setup.py   install

 

Installing Python IDE Editor

Depends on your preference, here are two free Python IDE you may use

  • PyCharm: http://www.jetbrains.com/pycharm/download/index.html
  • PyScripter: https://code.google.com/p/pyscripter/

 

Reference of Python/Selenium API

Leave a Reply

Your email address will not be published.