Robot Framework : Installation on Ubuntu and Linux


Robot Framework Logo
Robot Framework can be installed on all major operating system platforms (Windows/Linux/Unix/Ubuntu/Mac-OS).

After having setup Robot Framework and various test libraries on my Windows-7 system, I wanted to also set it up on Ubuntu (12.04 LTS). The steps mentioned below should also work for Linux. If that's not the case, feel free to mention your findings in the comments.

So, let's get started with the installation.

1. PYTHON

Python is bundled with the Ubuntu/Linux installation.

To check if it's installed, and the installed version of Python on your system, enter the below command in terminal (shortcut key for terminal: Ctrl+Alt+T):

$ python --version

If Python is installed, you should see something like below as the output:

Python 2.7.3

Note that - Robot Framework is not yet supported on Python 3. You must have Python 2.5.X (or higher) version installed (in order to install Robot Framework 2.5 or higher)

If you need to upgrade your Python (say from 2.7.3 to 2.7.6), check out the below link:
http://askubuntu.com/questions/443048/python-2-7-6-on-ubuntu-12-04-how-to


2. PIP (Python Package Manager)

easy_install and pip are package managers for installing Python packages. Using pip is recommended as it's more advanced and has good uninstallation support.

To install pip, run the below commands:

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py



3. ROBOT FRAMEWORK

Install Robot Framework package using pip:

$ sudo pip install robotframework

This will install the latest version of Robot Framework. If you have a need to install a specific version, mention the version as below (replace 2.8.4 with your desired version):

$ sudo pip install robotframework==2.8.4

Once the installation completes, to verify if the installation went OK, enter the below command:

$ pybot --version

If the setup was successful, you should see something like below as its output:

Robot Framework 2.8.4 (Python 2.7.3 on linux2)

4. SELENIUM2LIBRARY : Robot Framework's Test Library for Webdriver tool

In order to work with Webdriver (Selenium 2) and Robot Framework, you need to install 'Selenium2Library'. You can perform the pip installation as below:

$ sudo pip install robotframework-selenium2library

This will automatically install its dependencies (decorator, selenium packages). Once the installation completes, to verify if the installation went OK, enter the below commands:

$ python

This starts the Python interpreter. Now, enter the below statement:

>> import Selenium2Library

There wouldn't be any output :). No error indicates that the library was installed successfully. You can exit the Python interpreter using exit() command.

5. RIDE : Robot Framework Integrated Development Environment

RIDE is an IDE for test development using Robot Framework.

As RIDE is developed using wxPython, you need to install wxPython 2.8 toolkit with unicode support to run RIDE. Unfortunately, pip cannot be used to install wxPython (as setup.py doesn't exist for wxPython). Run the below commands to install wxPython:

$ sudo apt-get install python-wxgtk2.8
$ sudo apt-get install python-wxversion


Now, you can perform the pip installation for RIDE as below:

$ sudo pip install robotframework-ride 

To  verify if the installation went OK, run the below command:

$ ride.py

You should see the RIDE application GUI:


Congratulations! You are all set to develop your automated tests on your Ubuntu/Linux system using Robot Framework and Selenium2Library in the RIDE editor !!

[search terms:  robot framework installation, robotframework ubuntu linux, selenium2library installation ubuntu linux, ride installation ubuntu linux, robotframework, selenium2library]

17 comments:

Anonymous said...

Very clear and helpful!

Jay said...

Thanx for the useful info...keep posting more on robot framework..

Anonymous said...

Robort framework insall successfully.But after that when i am trying to run " pybot --version
" its give me command not found

Arnel Arnaldo said...

This document helped me a lot in installing Python, RobotFrameworks and RIDE on my Ubuntu 14.04 machine. The instructions are clear and orderly. I will recommend this to my colleagues.

Thanks so much.

Anonymous said...

very clearly explained much better explanation than robotframework website.
Thank You very much.

Joris255 said...

Thank you !

Anonymous said...

Debian 8.2 says:

Package python-wxgtk2.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-wxgtk2.8' has no installation candidate

Ubuntu User said...

Very clear.. Thank you so much for your detail explanation.

Anonymous said...

Thanks so much for this article! I am facing one issue with the last step, though ! All the steps were successfully done but when I run ride.py, GUI does nit come up, instead it just hangs there. Kindly help. Thanks in advance!

kishore said...

good material

Anonymous said...

Thanks for clear steps :-)

Anonymous said...

Unfortunately python-wxgtk2.8 no longer exists in Debian, and ride isn't compatible with the newer 3.0 version. Buidling it from source doesn't seem to work out of the box, and leads to all sorts of headaches.

Srujan said...

Very clear steps, installation went very smooth.
Thank you!

Unknown said...

Im not seeing Toolbar under RIDE (FILE,EDIT,TOOL,NAVIGATE,MACROS,HELP menus) in ubuntu. But in windows seeing the menu options.
Can someone help me ?

Anonymous said...

Very Clear information to Install Robot Framework.
Please keep on posting.

Amira Soliman said...

i have this issue "Unable to access the X Display, is $DISPLAY set properly?
" after running "ride.py"
and also i have ran the below command
export DISPLAY=0.0

Unknown said...


WebDriverException: Message: 'geckodriver' executable needs to be in PATH. is showing

Post a Comment