This project aims to automate the login functionality of a simple login web application https://seleniumbase.io/realworld/login using robot framework and playwright
-
Install Robot Framework:
-
Install Playwright:
-
Install Dependencies
- pip install python-dotenv
-
Set up the project:
- Clone this repository.
-
Configure the test environment:
- copy .env_example to .env_test and change the value.
- Host url is https://seleniumbase.io/realworld
- Credentials can be obtained https://seleniumbase.io/realworld/signup.
-
Run the tests:
- Open a terminal or command prompt.
- Navigate to the project directory.
- Run the tests using the command
robot -d results -v ENV:test tests/
.
The directory structure is as follows:
tests
: Contains the test caseslogin.robot
: Contains the test cases for the login functionality.
resources
: Contains the test keywords, locators, variables.keywords/login.resource
: Contains the keywords for logging in and verifying error messages.locators/login_page.resource
: Contains the elements locator of login pagevariables/env_variable.py
: Contains environment configuration variables