robotframework-cookbook icon indicating copy to clipboard operation
robotframework-cookbook copied to clipboard

A curated list of Robot Framework recipes to help beginner and intermediate engineers create test automation scripts faster.


robotframework-cookbook

All Contributors

Actions Status License: MIT code style: black Maintenance

A curated list of delicious Robot Framework recipes that will help you develop new test automation scripts faster, especially for beginner or intermediate level engineers.

If you need help writing Robot Framework scripts or wish to update older scripts to use newer syntax then you have come to the right place. Here we will compile and maintain recipes of working Robot Framework scripts that can be used in your domain.

In the first part of the cookbook there are many simple recipes showing how to use builtin keywords and additional keywords from both internal and external Robot Framework libraries. Towards the back of the cookbook there are complete case studies demonstrating whole projects and test automation solutions.

Other useful resources

Notes for contributors

Contributions from the wider community are most welcome! Contributions can be either single recipes or whole case studies.

We recommend using Robotidy to help standardise the format of the Robot Framework code.

We also recommend using the Robot Framework Robocop static analysis tool to check your scripts are clean before submission. Robocop can be installed using pip:

$ pip install -U robotframework-robocop

Issues are welcome and you can use them to post ideas for new recipes or report bugs and other observations for exisiting recipes.

For larger submissions simply clone this repository, create a feature branch (or work directly on master) and submit a pull request to merge your branch. If you are not comfortable with Git workflow then simply post your submission on the #cookbook Slack channel and I will help you publish your recipe or case study.

Table of contents

  1. Standard Library - BuiltIn
    • Recipe 1.1 - Hello World Logging
    • Recipe 1.2 - For Loop
  2. Standard Library - Collections
    • Recipe 2.1 - Explaining Variable Prefixes
    • Recipe 2.2 - Handling Lists
    • Recipe 2.3 - Handling Dictionaries
  3. Standard Library - DateTime
    • Recipe 3.1 - Handling Dates
  4. Standard Library - OperatingSystem
    • Recipe 4.1 - Working With File System
  5. Standard Library - Process
  6. Standard Library - Remote
  7. Standard Library - String
    • Recipe 7.1 - String Manipulation Examples
  8. Standard Library - XML
  9. External Library - REST API
    • Recipe 9.1 - Working With Requests Library
    • Recipe 9.2 - Working With RESTinstance Library
    • Recipe 9.3 - Working With Browser Library
  10. External Library - Databases
    • Recipe 10.1 - Working With Databases
    • Recipe 10.2 - Hacking Database View
  11. External Library - SSH
    • Recipe 11.1 - Working With SSH
    • Recipe 11.2 - Retrieve Output from SSH Run Command
  12. External Library - Parallel executor for Robot Framework test cases (pabot)
    • Recipe 12.1 - Running Tests in Parallel
  13. External Library - SeleniumLibrary and SeleniumTestability
    • Recipe 13.1 - SeleniumLibrary & SeleniumTestability setup
  14. External Library - AWSLibrary - for interacting with Amazon Web Services (AWS) Cloud Computing Services
    • Recipe 14.1 - AWS Simple Storage Service (S3)
  15. External Library - Robot Framework Browser library powered by Playwright.
    • Recipe 15.1 - Working With Browser Contexts
  16. Robot Framework 4
    • Recipe 95.1 - Robot Framework 4 Native IF, ELSE, ELSE IF Syntax
  17. Case Studies
    • Case Study 01 - Regression Testing Gerald Ford International Airport (GFIA) Parking Lot Calculation Tool
    • Case Study 02 - Transcoding video library to a contemporary format suitable for all play back devices, e.g. mp4 or mkv

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Adrian Yorke

πŸ’» πŸ“– 🚧 πŸ‘€

Tom Purl

πŸ’» πŸ“–

Szabolcs TΓ³th

πŸ’» πŸ“–

Jani Mikkonen

πŸ’» πŸ“–

BartΕ‚omiej Hirsz

πŸ’» πŸ“– 🚧 πŸ‘€

Christoph

πŸ’» πŸ“–

Mikko Korpela

πŸ’» πŸ“–

ericbjones

🎨 πŸ’» πŸ“–

Emna Ayadi

πŸ““ πŸ’»

Joonas VenΓ€lΓ€inen

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!