Monday, August 16, 2021

Robot Framework with VS Code and RF Language Server

 Installing Visual Studio Code and Robot Framework Language Server 

VS Code, Robot Framework, and Python/Pip installation for test automation


Robot framework scripts are plain text files.

It is possible to write Robot Framework scripts in any text editor like Notepad, but you might make small mistakes that could be hard to catch. Proper tools are also available to make your life easier. 

These tools are very helpful especially when you’re starting afresh. 

One such tool is Visual Studio Code. Visual Studio code is available for many platforms including Windows, Linux, and Mac.

An alternative is IntelliJ PyCharm IDE but in this tutorial, I’m going to show you how to setup VS Code for creating Robot Framework automation scripts. 

I’ll launch the browser and download Visual Studio Code



Let’s install it. You'll need to agree to the terms and conditions.

We'll select all options on “Select Additional Tasks”  and click Next then click Install.

I’ll leave checked the “Launch Visual Studio Code” option and click Finish


Visual Studio Code will open after you click the finish button.

Maximize the VS Code window and click the Extensions icon on the left side.



Search for “Robot Framework Language Server Extensions” and install it


After this search for “Python” in plugins and install the one from Microsoft. 


When the installation is finished, we’ll be good to start work with Robot Framework but there is one small pre-requisite we still have to download to run automation.

I'll show that to you in my next article.

Stay tuned. If you have any questions, please feel free to ask.

All articles in the Robot Framework Test Automation series


  1. Introduction to Robot Framework, Test Automation, and RPA Tool
  2. Installing RobotFramework, RobotFrameworkSelenium, Python on your PC & updating Pip
  3. Robot Framework with VS Code and RF Language Server
  4. The role of browser driver in test automation and downloading Google ChromeDriver to use with Selenium and Robot Framework

Thursday, August 12, 2021

Installing RobotFramework, RobotFrameworkSelenium, Python on your PC & updating Pip

 Installing Python to run Robot Framework

The Robot Framework is built using Python programming language. To use Robot Framework, you don’t need to know Python. But, you still need to have it installed on the machine where you want to develop Robot framework automation scripts or run them. 

Let’s download and install the latest version of Python by visiting python.org.


Python.org - download Python

We’ll download the latest version. 

Hover the mouse over the "Downloads" menu item and select the latest version for Windows.




Many versions for a variety of platforms are available here(on Python's website). 

You can download using any browser be it Edge or Chrome.  

I planned to teach how to perform automation using Google Chrome in the course for which I wrote this material and thought to install Chrome plus the Chrome Driver later on. 

Now open the installer file. 

Do remember to click the checkbox “Add Python x.y to PATH”



It is important to note down the path where you’ve installed Python. 

Click customize installation

Click next

I am not changing anything but I just wanted you to see what are the options available. 

Click next again and click install

Once the installation is finished, I’ll click close. 

Now let’s check through Windows Powershell if we can run python from there or not. 

Having python installed correctly is necessary for running Robot Framework automation. 

I’ll click the windows button and type Powershell. I’ll click it to open it. 

Windows 10 Opening Windows Powershell


Over here, I’ll type Python space -version command to find Python version and press enter. 

Python -version 

You can see that the currently installed version. 


How to update Python Package Manager Pip

Updating Pip is a small but important detail. It is an integral part of the Python echo system but the latest version doesn’t come bundled with the setup for some reason. 

Pip is the default package manager software that comes bundled with the Python programming language. 

We are going to use Pip to install the robot framework library in our Python setup. 

It is a command-line based tool

We are going to use a command to find the current version of pip installed on our PC and whether it’s the latest and greatest or not. 

I’ll open the PowerShell

I will type the command and hit enter

pip list



The command which is used to upgrade pip is also shown below. I’m going to type it and hit enter. 

Python -m pip install --upgrade pip

The example shows the full path of python installation but I’m using just the word Python, because we’ve added this path to our system’s path variable. 



An upgrade(of Python pip) will be downloaded and installed for you, it is a small package. 

If it gets stuck here, hit enter a few times and you’ll be done. 


Installing RobotFramework and RobotFrameworkSelenium on your PC

After installing Python and upgrading the Pip package manager, we are going to install the Robot Framework using PowerShell. 

The command is very simple, let’s type it in and press enter

Pip install robotframework

Once the command has been successfully executed, the Python installed on your PC will have all the components of Robot Framework available locally. 

Important

For performing browser automation with Selenium, we must install the robotframework-Selenium library 

Let’s do it. 

Pip install robotframework-seleniumlibrary

Once the installation is finished, we’re good to run Robot Framework scripts on this machine. 

In the next blog(and upcoming video) I'll show you how to install tools in Visual Studio Code to create Robot Framework scripts. 

All articles in the Robot Framework test automation series


  1. Introduction to Robot Framework, Test Automation, and RPA Tool
  2. Installing RobotFramework, RobotFrameworkSelenium, Python on your PC & updating Pip
  3. Robot Framework with VS Code and RF Language Server
  4. The role of browser driver in test automation and downloading Google ChromeDriver to use with Selenium and Robot Framework