Upcoming Open Source RPA Tool Robocorp | Beginners Guide 2020

(Step by Step guide to start building your robot using #robocorp)

Amidst all the extraordinary circumstances, Robocorp is all set for going live. 

Robocorp Suite has the deepest feature set, yet is very easy to use and master. Robocorp is the most full-featured open-source RPA tools which help you to build any automation you want…

In this ultimate guide, I have covered- 

  • Introduction to Robocorp
  • Quick Intro to Robot Framework
  • How to set-up a Development environment 
  • How to build your first robot using the Robocode Lab
  • Many more…

Let’s get started.

Automate Any Task with Open Source RPA Tool Robocorp | Beginners Guide 2020

Introduction

RPA is not all about learning UiPath or Blueprism or Automation Anywhere tools, you should know how to translate business users’ problems into robust automated solutions and analyze the problem at hand beyond the current manual way of doing it.

You should invest your time in understanding how the RPA tools work, not just how they are used. This will be handy when you start using more developer-oriented tools for automation.

In this article, I will discuss Robocorp, A Developer Oriented Opensource RPA Tool.

Robocorp was in news last year for its $5.6M seed to bring an opensource option to RPA World. And Now, San Francisco based startup is all set to roll-out from 1st July 2020

Robocorp Suite is a combination of different tools. Robocode lab and Robocode CLI (IDE and CLI tools) are open source. While Robocloud provides centralized orchestration of software robots form cloud-based Solution.

As quoted by Official website “Robocorp Suite is built for RPA developers, not business users. It is easy to get started with our tools, no need to contact sales, just download and start using it!”

So, let’s get started and build our first robot using Opensource RPA Tool Robocorp.

So, you can use all components of RPA tools provided by Robocorp for free and you will be only charged when you want to scale up.

At the moment three options are available. (This might change!)

  1. Developer – Free Until Launch
  2. Team – $200 USD / Month
  3. Pro – $800 USD /Month

This tutorial is designed for software programmers/testers, who want to learn the basics of Robot Framework automation testing in simple and easy ways. This tutorial will give you enough understanding on various functionalities of Robot Framework with suitable examples.

Table of Contents

Pre-requisites

  • Basic understanding of Python, Virtual environment and pip
  • Robocorp Environment (Robocloud, Robocode Lab, Robocode CLI) set up correctly and connected with Robocloud)
  • RPA Framework is built on top of Robot Framework (open-source set of tools that can be used to test and automate software processes) hence you need basic understanding of Framework.

Robocorp Environment Overview

robocorp-suite-overview
[Image Source - Offical Website Robocorp]

Robocorp  has 4 components –

  1. Robocloud – Cloud-based centralized orchestration /Controlling run time resources/ Manage workers
  2. Robocode Lab – IDE for creating your software robots.
  3. Robocode CLI – Command line tool to perform various activity
  4. Robocloud Worker – Runtime resource to execute your task

Another important component is Robohub, which contains all the helpful tutorials, resources, and examples, how-to-guide to get started.

RPA Framework is supported by Robocorp is well documented and maintained set of RPA libraries for both Python and Robot Framework.

How to setup Robocorp Environment for building your first robot

As explained above, Robocorp contains a set of tools to build RPA automation, Lets start with configuring the environment for our development.

Step #1:  Setup Robocloud

  • First thing you need to do is signup on Robocloud to set up Organization and workspace to group your development. You can signup here-
  • The best part is signup process is pretty quick and simple, you don’t need to provide much information and with few click, you will log in into Robocloud
  • You will be assigned default Organization & Workspace to start with, I will suggest to rename them more meaningful to you.
  • For my example, I have renamed Organization to “RPABOTSWORLD” and Workspace to “RPA Workspace”. This can be easily done by clicking on the “gear” icon and rename.
  • You are allowed to add up to 2 Organization and currently, no restriction has been imposed on the workspace, so you can create multiple workspaces of related processes, configuration, results and for managing user access.
Upcoming Open Source RPA Tool Robocorp | Beginners Guide 2020 1

Step #2:  Setup Robocode Lab

  • Robocode lab is the next tool you need to set up, you can download the Installer based on you operating system, I loved this part as other major tools even lack in this feature to provide IDE for all three OS(Windows/Linux/Mac)
  • Its build on open-source components and provide very simple yet powerful user interface to build software robot.
  • You can access the download link from Robocloud, click on your user menu on the top right corner of the screen and click on the Download Robocode link.
  • It takes only few minutes to install. In case you are looking for you operating system specific steps. Follow the Documentation guide kept here
  • It is also easy to integrate with Robocloud, allowing you to execute the robot completely in the cloud! And get email notifications!
  • Leveraging Robot Framework, Python, VSCode, and the Jupyter ecosystems this can be manually setup using Python Virtual Environment if you love to do it in developer style however, Robocode lab provide quick way to do it.
robocode-lab-overview

Step #3:  Connect Robocode Lab with Robocloud

  • Once you have successfully downloaded Robocode Lab and installed on your machine Connecting with Cloud is pretty simple step.
  • All you need to do is; Click on Icon on Launcher page to provide your credential and it will be connected automatically

Important!

Robocode Lab comes with useful example activities that you can download from within the application, including all you need to work on your robot in this course. Click on the Download Example Activities button in the “Get Started” section in the Robocode Lab welcome screen:

After a loading screen, you will be taken back to the welcome screen. On the right, you will see a list of example activities.

Know all About Robot Framework

Robot Framework is a generic open-source automation framework. It can be used for test automation and robotic process automation (RPA).

Robot Framework provides support for external libraries, tools which are open source and can be used for any type of automation.

The most popular library used is the Selenium Library used for web development & UI testing.

You can read more about the Robot Framework here.

As Robocorp is tightly integrated with Robot Framework for building RPA Automation Cases, you need to understand various terms used in tabular format file created using the framework.

Those who already worked with Robot Framework will have added advantage to use the same code to extend their test automation to new areas.

Robot framework comes with a simple tabular format where the task is written using keywords. Let’s understand basic building block of. robot file.

Section in. Robot File

Description

***Settings***

It is used for importing resource files, libraries, and variable files. Also used for defining metadata for use cases and test suites.

***Variables***

Used for defining variables that can be used elsewhere in test data.

***Tasks***

Used to create tasks using available keywords

***Keywords***

Creating user keywords from available lower-level keywords

***Comments***

Additional comments that are normally ignored by the framework

Here is a link for official documentation. In case you wish to read more details on various key concepts used in #robotframework.

How to Create Your First Robot Using Robocorp

The best way to start is using the example given by the “Robocorp Team”, You should go through the given example to understand the working, try running them and then start creating something basic.

Those who are already familiar with Robot Framework, Jupyter notebook and they will not face any challenge, however, if you have not worked with Jupyter notebook (Part of Anaconda Distribution) will face some challenges while running the bot.

For this article; we are going to build a stock price scraper robot which is capable of doing following steps –

  • Open Chrome web browser
  • Go to Rediff Money 
  • Get Prices for a given input of Sector such as oil gas etc.
  • Create a file system directory for the given input sector
  • Store the price information in files in the above-created directory
Upcoming Open Source RPA Tool Robocorp | Beginners Guide 2020 2

Step #1 Create/Initialize the software robot directory

There are two ways of doing it; It all depends upon your preference.

  1. Navigate to your project’s directory in the terminal or the command prompt. Initialize the software robot directory:
robo init basic-robocorp-example
  1. Alternatively, you can create a new package using Robocorp Lab Splash screen and selecting create a new package
  2. Once Package is initialized it will create a folder structure as per below.
Tutorial for creating a web scraper software robot using Robot Framework and RPA Framework.

Step # 2 Robot task file (tasks/robot.robot file)

Robot task file is the main file where you need to define the working of Robot, for better reusability keywords should be defined into resources folder so that they can be reused in multiple blocks.

You can treat this as main activity page, which call other subtask as per design.

For my Example (It will look like)

Upcoming Open Source RPA Tool Robocorp | Beginners Guide 2020 3

Step #3. Robot keywords file (resources/keywords.robot file)

This file contains all the list of Keywords which will be used in the Robot Operation, this contains user-defined as well as default keywords imported from different library.

You can notice the use of Library (At top of file) which are nothing but reusable python packages designed for various operation.

For my Example (It will look like)

Upcoming Open Source RPA Tool Robocorp | Beginners Guide 2020 4

Step #4 Variables file (variables/variables.py)

This file will contain all the assets, URL and other configuration. You might notice this as python file i.e. we can seamlessly integrate different python packages to store values(Such as os info, network, DateTime etc.)

For my example, it’s pretty simple.

'''
Variables for Robot Framework goes here.
'''
import calendar
from datetime import date
WEEK_DAY_NAME = calendar.day_name[date.today().weekday()]
FINANCE_URL = "https://money.rediff.com/sectors/bse/"
SCRIPT_NAME = "oilgas"

Step #5 Debug/Run Activity (Test the robot Run)

Once you are done with changes in your project code(for my example 3 files above) you can run it directly from Robocorp lab.

  • The best part of this is jupyter lab integration help to run the robot using cells(Those from python background will love it :P) so that you can see the result inline.
  • In case there are any issues it will display the inline debug log which can be obviously downloaded, But it’s pretty nicely formatted to pinpoint what exactly went wrong and you can get detailed information on same (See attached below).
  • Once you are able to run the bot successfully, Now its turn for wrap the Robot.
Task Execution Log

 

Step #6 Wrap the robot

You can use Robocorp CLI utility to run command –

robo wrap

This will package your first robot as an executable package so that you can run it anywhere!

Step#7 Run the robot

Running your bot is supper easy task, you can use below commands to run it locally.

Running robot files (robo run entrypoint.sh, robo run entrypoint.cmd)

robo run entrypoint.sh

Conclusion 

  • Open Source RPA Tool Robocorp supports for external libraries make its perfect choice for exploring the intelligent automation  use cases by leveraging Machine learning & AI-based python library
  • The developer community is already using Robot Framework (RF) keyword- and data-driven test automation framework for acceptance test-driven development (ATDD) so it’s easy to use it for RPA use case as well.
  • Developers can extend the framework with their own keywords and libraries.
Scroll to Top