How to install Robot Framework on Windows

Robot Framework is an open-source test automation framework that is simple to use with minimal programming. In this blog, we give step-by-step instructions on how we installed the robot framework on windows.

GraphQL has a role beyond API Query Language- being the backbone of application Integration
background Coditation

How to install Robot Framework on Windows

Robot Framework is an open-source test automation framework that is simple to use with minimal programming. It is supported by the Robot framework foundation and works on all types of operating systems. The robot framework comes with a simple tabular format i.e. RIDE editor, where the test cases are written using the keyword format. Writing test cases using keywords is easier by adding/installing external libraries.

Here, we installed the robot framework on windows by using the following steps:

Let’s begin with python and it’s related environment setup
  • Python Installation - Download and install Python from their official website
  • Need to update environment variables -
    Update the PATH variable with: please add the drive path where you installed python.
    (please use path where you’ve installed python, I’ve done it in C:\ drive)
    —>  C:\Python3
    —>  C:\Python3\script
    —>  C:\Python3\lib\site_packages\
  • pip installation - check if pip is already installed with commandpip --version
    Note: please, use ‘pip3 --version’ if you’re using Python 3.
Installation of dependencies
  • Install Robot framework and libraries.
    - Check if python and pip were installed successfully
    → python --version
  • If you have already installed python and pip successfully then you can directly execute the following commands for Robot Framework.
    → pip install robotframework  (If this command is not executing successfully then you can try by using the RobotFramework version, which is mentioned below.)
    → pip install robotframework == 5.0.1  (use specific version - it’s more helpful, this worked for me)→ robot --version (to confirm if installation was successful)
  • If you want to upgrade with latest version then simply you can run following command:
    → pip install --upgrade robotframework.

  • After installing the Robot framework successfully, now try to install Ride editor by using the following command.
    pip install robotframework-ride   (If it gives an error for package wxPython while installing, then you can try to install wxPython with its version.)
    → pip install wxPython ==4.1.1 (while executing this command if timeout issue occurred then you can execute below command)
    pip install wxPython ==4.1.1 --timeout=300   (This will definitely resolve the timeout issue.)
  • Again try to install Ride Editor by using the following command.
    → pip install robotframework -ride(If the above command is not executed properly then try the below command with the ride version.) Note: use updated version here. → pip install robotframework -ride ==2.0b1 --user
    pip install robotframework -ride ==2.0b1 --timeout=300
  • Open RIDE editor by using the following command – (After executing this command your RIDE Editor is ready to use.)
Checking RIDE editor
  • Once you open Ride editor try to run a test case. You may encounter ‘’ failed issue, please run below command then
    Then execute below command -
    → pip install psutil --timeout=300
  • Now, you can check all the installed packages and libraries by using below command
    → ‘pip freeze’                — (it will give show the list of packages and libraries)
Try different commands

- Install below commands so we can use the selenium and Excel/CSV keywords in the coding.

  • ’pip install robotframework-SeleniumLibrary’
  • ’pip install robotframework-excellib’
  • ’pip install robotframework-csvlib’

- How to use different libraries (like “selenium”) with Robot

  • Steps for adding libraries in the project. After adding libraries into the project, it allows users to use the set of keywords.

First step

Second step

Third step

- I am sharing a few important events which are commonly used from Selenium library

  • How to click specific element and how to enter data in input boxPlease note: I’m pre-assuming you know how to select/find locator of a particular element. If you don’t know please follow this tutorial

# find proper locator of calendar to open it
#..locator can be xpath/cssSelector/id
Click Element    Locator

# find locator of input text and enter data in it, please make sure you're
# following required format. In my case format was dd/mm/yyyy.
Input Text    Locator    Input required date

  • How to append to list

# intialise list first
@{random_row_list}    Create List
# ...
# ...

Append To List    ${random_row_list}    ${values}

  • How to handle files

# initialise file
Create File    tempfilename.csv
# ...
# if you've headers in a list, convert them to string
${header_string}    Convert List To Comma Seperated String    ${header}
# ...
# append this string to initialised file like given command below
Append To File    tempfilename.csv    ${header_string}

  • How to split strings into array

# assuming you've string and you want to split it on space
${array_result}=    Split String    ${some_random_string}    ${SPACE}

  • How to define functions and how to call them

# Please note "This is my function name" is actually referred as function name
# ...
# business logic before executing the function
${returned_data}    This is my function name    ${first_parameter}
# ...
# ...
# write your business logic once you get data from function

This is my function name
   [Arguments]    ${first_argument}
   [Documentation]    This is function documentation
   # ...
# specify what you want to do with the function
 # specify return_value, if required
   [Return]    ${return_value}

Note: What’s the necessity or importance of indentations in the Robot framework?
In python, indentation refers to spaces that are used at the beginning of a statement. It is used in the loop and conditional statements. Its main use is to indicate a block of code. When you want to indent code then you have to add 4 white spaces or click on the tab button.

Hi, I am Sneha. With three years of experience, in manual and basic knowledge of automation testing. When I am not testing, I love to do portrait sketching. I love finding bugs to build a quality product. I am always seeking an opportunity to work & learn everything about automation.

Want to receive update about our upcoming podcast?

Thanks for joining our newsletter.
Oops! Something went wrong.