This project demonstrates the use of the Robot Framework for both Selenium-based web automation and API testing. It includes example test suites that showcase how Robot Framework can be used to automate UI workflows and validate API endpoints.
ROBOT-DEMO/
│
├── .github/ # GitHub-related workflows or configs
├── drivers/ # Browser drivers (e.g., chromedriver)
│ └── chromedriver
├── libraries/ # Custom Python or Robot libraries
├── resources/ # Resource files (keywords, variables)
├── test-data/ # Test input files (e.g., images, CSVs)
│ └── mandella-worldcup.jpeg
├── tests/ # Robot Framework test cases
│ ├── api/ # API test cases
│ ├── examples/ # Sample or reference test cases
│ └── selenium/ # UI tests using Selenium
├── .gitignore # Git ignore rules
├── log.html # Robot test execution log
├── output.xml # Robot test execution raw output
├── report.html # Robot test execution summary report
└── README.md # Project documentation
You can download Python from python.org. Make sure to check "Add Python to PATH" during installation.
python -m pip install --upgrade pip
pip install setuptools # Required for FakerLibrary
pip install robotframework
pip install robotframework-seleniumlibrary
pip install robotframework-requests
pip install robotframework-faker
pip install Faker
Ensure Chrome is installed and download the corresponding ChromeDriver from: https://sites.google.com/chromium.org/driver/
Place the driver in a folder that's in your system PATH
.
- VS Code: Install the "Robot Framework Language Server" extension.
Here’s a clean and clear update for the VS Code setup section in your README.md
:
Make sure to install the following extensions to enable full support for Robot Framework development:
- ✅ Robot Framework Language Server — Syntax highlighting, code completion, and Robot language support.
- 🐍 Python — Required for running and debugging Python-based tools.
- 🐞 Python Debugger (debugpy) — Enables debugging Python code used in custom libraries.
- 📏 Pylint — For linting Python files and maintaining code quality.
robot tests/
robot tests/selenium/test_login.robot
robot -d results tests/
You can revise the original section to reflect that your test automation suite now includes API tests in addition to Selenium-based UI component tests.
Here’s the updated version:
Our test suite includes both UI and API automation using Selenium and Robot Framework with RequestsLibrary. The automated components and features include:
- Add/Remove Elements
- Alerts & Modal Dialogs
- Context Menu
- Login & Error Handling
- Dynamic Controls
- File Uploads
- Frames & Windows
- JavaScript Alerts
- and more...
- User Login & Logout
- Create Contact with Static & Random Data (Faker)
- Validate Response Structure
- Field-by-field Response Validation
- Negative Testing (e.g., create after logout)
These API tests use:
RequestsLibrary
for HTTP interactionsFakerLibrary
for generating random, realistic test data- Custom libraries and keywords for reusable components and test logic
After running the tests, Robot Framework will generate:
report.html
– Summary of test executionlog.html
– Detailed logsoutput.xml
– Raw result data
All located inside the results/
directory.
- Page Object style keyword definitions are stored in
resources/
. - Common variables (e.g.,
${URL}
,${BROWSER}
,${TIMEOUT}
) are stored invariables.py
. - Browser runs in incognito mode by default with additional ChromeOptions.
Janesh Kodikara