How to use Selenium Web Driver in Python | Ubuntu 14.04

Following are the step by step commands for making sure the right way in which you are preceding for making automation scripts for web browsers with selenium.

Selenium :

Selenium automates browsers. That’s it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.


Make sure you have latest browser bundle. I prefer chrome.

Step 1: Download and install Google chrome for your Linux distribution.


sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb

Step 2: For selenium to work you should have chrome driver. Make sure you download latest driver and put it in following directories after uncompressing.

LATEST=$(wget -q -O -


3: Create symlinks

sudo ln -s $PWD/chromedriver /usr/local/bin/chromedriver


4: Install Selenium with pip

apt-get install python-pip
pip install selenium

5: Sample Python program . for reference visit

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> from selenium import webdriver
>>> d = webdriver.Chrome()
>>> d.get("")
>>> d.title



Follow our Youtube Channel for tutorials on Ethical Hacking

Click here to visit our channel –> CHANNEL

#like #comment #share

Click here to visit our Facebook Page SECTOR443



Stay Safe Stay Secure | Sector443

Leave a Reply

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