RoboCon 2024

Creating a Web Testing Framework from scratch using Robot Framework and Browser Library
2024-03-01 , RoboConOnline

Starting a new web project? Need to automate manual web tests? Want to automate some other browser based processes? This tutorial will help You set up Your web testing framework from scratch, the right way!


Creating a Web Testing Framework using Robot Framework and Browser Library from Scratch

  1. Initial Setup - 10 minutes
    - In this step, we will set up the environment for our web testing framework. We will install the necessary software and libraries, and configure the system to run our tests.

  2. Basic Web Test Case - 20 minutes
    - In this step, we will create a basic web test case using Robot Framework and Browser Library. We will learn how to open a browser, navigate to a website, and perform some basic actions.

  3. Introduce Page Object Pattern - 20 minutes
    - In this step, we will introduce the Page Object Pattern, which is a design pattern used in web testing to make tests more maintainable and easier to read. We will learn how to create page objects and use them in our tests.

  4. Move Locators to Variable Files - 10 minutes
    - In this step, we will move the locators used in our tests to variable files. This makes it easier to maintain our tests as we can change the locators in one place instead of having to update them in multiple places. This also allows easier reuse in multiple locations

  5. Handle File Upload and Download - 20 minutes
    - In this step, we will learn how to handle file upload and download using Robot Framework and Browser Library. We will learn how to upload a file to a website and download a file from a website.

  6. Handling iFrames and Shadow Dom - 20 minutes
    - In this step, we will learn how to handle iFrames and Shadow DOM using Robot Framework and Browser Library. We will learn how to switch between iFrames, interact with elements inside iFrames, and interact with elements inside Shadow DOM.

  7. Remote Execution using LambdaTest - 20 minutes
    - In this step, we will learn how to execute our tests remotely using LambdaTest. We will learn how to configure our system for remote execution and run the tests on LambdaTest.


Lessons Learned:

This was pretty much covered in the talk description, but it's as follows:
1. Initial Environment Setup for Web Testing with Browser Library
2. Creating Basic Web Test Cases using Browser Library
3. Using Page Object Pattern in Web Tests
4. Using Variable Files for Locators
5. Handling File Upload and Download
6. Handling iFrames and Shadow Dom
7. Remote Execution using LambdaTest

Describe your intended audience:

This tutorial is directed mostly at people who are interested in creating their first web testing framework or enhancing their existing one.


Basic Robot Framework knowledge will be required, but everything else should be covered within the tutorial. Also a non-corporate PC is advised as many company firewalls block npm repositories

Is this suitable for ..?:

Beginner RF user

Web Test Automation Specialist with 7+ years of experience in testing. Avid Robot Framework proponent and user