Monday, 17 March 2014

How to install Selenium Webdriver with Python in Windows?

You must follow below steps for the installation of selenium webdriver in windows operating system.

The list of Softwares you will need is given below.

  1. Python Engine
  2. Selenium Webdriver API in Python
  3. Web driver for Chrome/IE/Safari etc



1. Python Engine
You can download python msi from http://www.python.org/downloads and then install it. After installation, make sure that python command is accepted in the command prompt as shown below.

You will have to set the system variable Path as shown below. Please append the path to the existing value.
In below figure I have included “c:\python33\” and “c:\python33\Scripts” in path variable.


 2. Selenium Webdriver API in Python

You can get the selenium API in python at https://pypi.python.org/pypi/selenium Then you will have to unzip it and then you will see below folder structure.

Selenium Webdriver API

 To install selenium package, you will need to run below command in command prompt
  
> python C:\Python33\selenium-2.39.0\setup.py install

You may get below error while installing the selenium package.
package directory py\selenium does not exist python

To fix above error you will have to Make Selenium (where you have unzipped the selenium package) your working directory and then execute the command.

 3. Webdriver for the browser you want to test

For Firefox, you don't need to download any driver But for other browsers you will have to download driver. You can google it for these driver. You will find these drivers on https://code.google.com

What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at reply2sagar@gmail.com

No comments:

Post a Comment

Buy Best Selenium Books

Contributors