Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hjsblogger/getting-started-with-robot-framework

This repo helps you get started with Robot framework in Python
https://github.com/hjsblogger/getting-started-with-robot-framework

automation pabot robotframework selenium selenium-webdriver web-automation

Last synced: about 1 month ago
JSON representation

This repo helps you get started with Robot framework in Python

Awesome Lists containing this project

README

        

# Getting Started With Robot Framework In Python

![RobotFramework_Logo](https://github.com/user-attachments/assets/80317436-3905-4c43-8d87-9a64ee10e5a5)

Image Credit


Perform the following steps for running Robot tests on local machine or LambdaTest Cloud Grid

## Installation of Python packages

Packages that need to be installed are present in *pyproject.toml* Execution is performed on the LambdaTest Selenium Grid. We are using latest Selenium version for the execution. Install the project dependencies by running ```poetry install``` or ```poetry install --no-root``` on the terminal

1

The global dependencies (i.e. Robot Framework and latest Selenium) are installed by running ```pip install -r requirements.txt``` or ```pip3 install -r requirements.txt```on the terminal

2

## Configure Environment Variables

Before the tests are run, please set the environment variables LT_USERNAME & LT_ACCESS_KEY from the terminal. The account details are available on your [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile) page.

For macOS:

```bash
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
```

For Linux:

```bash
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
```

For Windows:

```bash
set LT_USERNAME=LT_USERNAME
set LT_ACCESS_KEY=LT_ACCESS_KEY
```

Since the same tests can be executed with Robot on local machine and Robot on LambdaTest cloud grid, the environment variable EXEC_PLATFORM also needs to be set before execution.

For execution with Robot on local machine:
```bash
export EXEC_PLATFORM=local
```

For execution with Robot on LambdaTest cloud grid:
```bash
export EXEC_PLATFORM=cloud
```

## Execution of Robot Tests

The Robot tests are located in the [Common folder](https://github.com/hjsblogger/getting-started-with-robot-framework/tree/main/Tests/Common). Hence, there is a flexibility to run all the four tests with Robot on local as well cloud. Once the environment variables are set, run the command ```robot Tests/Common/``` on the terminal to trigger the test execution.

Shown below is the execution snapshot of Robot tests running on local machine:

robot-local-execution

Shown below is the execution snapshot of Robot tests running on LambdaTest cloud grid:

As seen on the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build), the test execution is successful:

robot-cloud-execution-1

Here is the successful execution status as seen in the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build)

robot-cloud-execution-2

## Need Assistance?
Feel free to fork the repo and contribute to make it better! Email to [himanshu[dot]sheth[at]gmail[dot]com](mailto:[email protected]) for any queries or ping me on the following social media sites:

Twitter: [@hjsblogger](https://www.twitter.com/hjsblogger)


LinkedIn: [@hjsblogger](https://linkedin.com/in/hjsblogger)