Create Order Process

Open the robot order website

To get things started, you need to implement a keyword for opening the robot order website. Here's a draft for the keyword. You need to add the implementation (calling keywords to accomplish things):

*** Keywords *** Open the robot order website #ToDo: Implement your keyword here

Visual Studio Code: You can place the *** Keywords *** section either before or after the *** Tasks *** section. The order does not matter. You only need one *** Keywords *** section heading at the top; no need to add one for each of the keywords.


  • You need a library that knows how to work with a web browser. Robocorp provides two browser libraries. One for Selenium and another for Playwright based automation
  • We recommend using RPA.Browser.Selenium library for this course.
  • After importing the library, call the keyword for opening the browser. See the keyword documentation for the required keyword arguments. You might need to provide the URL of the robot order website!

When you get the robot order website to open in a web browser, you can proceed to the next step!

Download the orders file, read it as a table, and return the result

${orders}= Get orders


  • The orders CSV file is here:
  • You need an RPA Framework library for downloading things.
  • You want to overwrite the downloaded file if it exists to be able to run your robot over and over again. There is a keyword argument for telling that overwriting is ok!
  • There is an RPA Framework library for reading CSV files into tables that can then be looped in a robot script.
  • You need your custom Get orders keyword to return the result. See the Robot Framework keywords article. There's a section about returning things from a keyword.
  • Learn about assigning variables to assign the returned orders to a variable.

You can check if your code works from the log after you run your robot.

Loop the orders

You need to complete the ordering process for each of the orders.


  • You need to use a for loop.
  • For now, you can just log each order row inside the loop.
  • The task draft already contains valid for loop syntax, so you can steal that if you like!

Give up all your constitutional rights!

Time to get rid of that annoying modal that pops up when you open the robot order website. Let's implement the Close the annoying modal keyword.


  • You have already imported the library you need.
  • Keywords that click on things might prove useful here.
  • The "click on stuff" keywords need a locator so that they know what to click on. Locators are the bread and butter of automating web applications. It is good to spend some time reading about those.
  • You can use the browser inspector tools to find the elements to click on.
  • You can target HTML elements either with CSS type, class, ID, or attribute selectors or XPath expressions, or a combination of CSS, XPath, and text selectors.

Fill the form

Time to tackle the Fill the form keyword. This example keyword takes an argument.


  • Check the docs on using keyword arguments.
  • Use the order row that you got from the loop you built as the argument for this form filler keyword.
  • If the name of the variable you got from the loop is, for example, ${row}, you can access the value of the Head column like this: ${row}[Head].
  • You need keywords for selecting things and inputting text. You have a library you need already imported!
  • The input element for the leg number is slightly annoying. It does have an id attribute, but the value seems to change all the time! 🤬 Can you think of a way of targeting that element? There are no "correct" answers here, just many options!

Preview the robot

To robotically get the image of the robot, the robot needs to preview the robot (Yo Dawg!).


  • Click on stuff. Business as usual!

Submit the order

This one is a bit trickier case. Sometimes the submit fails. We really want the robot to complete the orders even when there are occasional errors on submit. How do we do that? 🤔