PramodDutta/qaskills/seed-skills/robot-framework-testing/SKILL.md
Robot Framework Testing
Expert-level Robot Framework testing skill covering keyword-driven syntax, SeleniumLibrary, RequestsLibrary, custom Python keywords, data-driven testing, resource files, and parallel execution with Pabot.
- Source repository stars
- 195
- Declared platforms
- 3
- Static risk flags
- 1
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
You are an expert QA automation engineer specializing in Robot Framework testing. When the user asks you to write, review, or debug Robot Framework tests, follow these detailed instructions.
Not for
- Hardcoded locators in test cases -- Putting css:.submit-btn directly in test cases. Move locators to variables files or page resources.
- Sleep instead of waits -- Using Sleep 5s instead of Wait Until Element Is Visible. Sleeps waste time on fast pages and are insufficient on slow ones.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Declared | Source record | Install path and trigger |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/PramodDutta/qaskills --skill "seed-skills/robot-framework-testing"Inspect the Agent Skill "Robot Framework Testing" from https://github.com/PramodDutta/qaskills/blob/c924c5f7fee5fa410f267031061e492eb051757a/seed-skills/robot-framework-testing/SKILL.md at commit c924c5f7fee5fa410f267031061e492eb051757a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Setup
Review the “Setup” section in the pinned source before continuing.
Review and apply the “Setup” source section. - 02
Core Principles
1. Keyword-driven design -- Robot Framework uses human-readable keywords. Write custom keywords that read like natural language: Login As User, Verify Dashboard Is Displayed. 2. Separation of concerns -- Keep test cases, keywords, variables, and resource files separate. Test fil…
Keyword-driven design -- Robot Framework uses human-readable keywords. Write custom keywords that read like natural language: Login As User, Verify Dashboard Is Displayed.Separation of concerns -- Keep test cases, keywords, variables, and resource files separate. Test files should be high-level; keyword implementations go in resource files.Library ecosystem -- Use SeleniumLibrary for web UI, RequestsLibrary for APIs, DatabaseLibrary for DB, and custom Python libraries for domain logic. - 03
Project Structure
Always organize Robot Framework projects with this structure:
Always organize Robot Framework projects with this structure: - 04
Installation
Review the “Installation” section in the pinned source before continuing.
Review and apply the “Installation” source section. - 05
requirements.txt
Review the “requirements.txt” section in the pinned source before continuing.
Review and apply the “requirements.txt” source section.
Permission review
Static risk signals and limitations
Network access
The documentation includes network, browsing, or remote request actions.
${BASE_URL} http://localhost:3000Network access
The documentation includes network, browsing, or remote request actions.
${API_URL} http://localhost:3000/apiEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 88/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 195 | Source | Repository attention, not individual Skill quality |
| Compatibility | 3 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- PramodDutta/qaskills
- Skill path
- seed-skills/robot-framework-testing/SKILL.md
- Commit
- c924c5f7fee5fa410f267031061e492eb051757a
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Robot Framework Testing Skill
You are an expert QA automation engineer specializing in Robot Framework testing. When the user asks you to write, review, or debug Robot Framework tests, follow these detailed instructions.
Core Principles
- Keyword-driven design -- Robot Framework uses human-readable keywords. Write custom keywords that read like natural language:
Login As User,Verify Dashboard Is Displayed. - Separation of concerns -- Keep test cases, keywords, variables, and resource files separate. Test files should be high-level; keyword implementations go in resource files.
- Library ecosystem -- Use SeleniumLibrary for web UI, RequestsLibrary for APIs, DatabaseLibrary for DB, and custom Python libraries for domain logic.
- Data-driven testing -- Use
[Template]keyword with data tables or DataDriver library with CSV/Excel for bulk test data execution. - Readable reports -- Robot Framework generates
report.htmlandlog.htmlautomatically. Configure tags and documentation for clear test reporting.
Project Structure
Always organize Robot Framework projects with this structure:
tests/
web/
login.robot
dashboard.robot
checkout.robot
api/
users_api.robot
products_api.robot
smoke/
smoke_suite.robot
resources/
keywords/
common.robot
login_keywords.robot
api_keywords.robot
pages/
login_page.robot
dashboard_page.robot
locators/
login_locators.robot
dashboard_locators.robot
libraries/
CustomLibrary.py
DataHelper.py
data/
test_data.yaml
users.csv
config/
variables.robot
variables_ci.robot
results/
robot.yaml # pabot config
requirements.txt
Setup
Installation
pip install robotframework
pip install robotframework-seleniumlibrary
pip install robotframework-requests
pip install robotframework-databaselibrary
pip install robotframework-datadriver
pip install robotframework-pabot
pip install webdriver-manager
requirements.txt
robotframework>=7.0
robotframework-seleniumlibrary>=6.2
robotframework-requests>=0.9
robotframework-databaselibrary>=1.4
robotframework-datadriver>=1.8
robotframework-pabot>=2.18
webdriver-manager>=4.0
Basic Test Patterns
Web UI Test (tests/web/login.robot)
*** Settings ***
Library SeleniumLibrary
Resource ../../resources/keywords/login_keywords.robot
Resource ../../config/variables.robot
Suite Setup Open Browser ${BASE_URL} ${BROWSER}
Suite Teardown Close All Browsers
Test Setup Go To ${BASE_URL}/login
*** Test Cases ***
Login With Valid Credentials
[Documentation] Verify user can login with correct email and password
[Tags] smoke auth
Enter Email ${VALID_EMAIL}
Enter Password ${VALID_PASSWORD}
Click Login Button
Verify Dashboard Is Displayed
Page Should Contain Welcome
Login With Invalid Credentials Shows Error
[Documentation] Verify error message for wrong credentials
[Tags] regression auth
Enter Email [email protected]
Enter Password wrongpassword
Click Login Button
Wait Until Element Is Visible css:.error-message 5s
Element Should Contain css:.error-message Invalid credentials
Login Requires Email Field
[Documentation] Verify email validation on empty submit
[Tags] validation auth
Enter Password password123
Click Login Button
Page Should Contain Email is required
Variables File (config/variables.robot)
*** Variables ***
${BASE_URL} http://localhost:3000
${BROWSER} chrome
${IMPLICIT_WAIT} 10s
${VALID_EMAIL} [email protected]
${VALID_PASSWORD} password123
${ADMIN_EMAIL} [email protected]
${ADMIN_PASSWORD} admin123
${API_URL} http://localhost:3000/api
Custom Keywords
Login Keywords (resources/keywords/login_keywords.robot)
*** Settings ***
Library SeleniumLibrary
*** Keywords ***
Enter Email
[Arguments] ${email}
Wait Until Element Is Visible id:email 10s
Input Text id:email ${email}
Enter Password
[Arguments] ${password}
Input Text id:password ${password}
Click Login Button
Click Button css:button[type='submit']
Verify Dashboard Is Displayed
Wait Until Element Is Visible css:.dashboard 10s
Location Should Contain /dashboard
Login As User
[Arguments] ${email} ${password}
Go To ${BASE_URL}/login
Enter Email ${email}
Enter Password ${password}
Click Login Button
Verify Dashboard Is Displayed
Login As Admin
Login As User ${ADMIN_EMAIL} ${ADMIN_PASSWORD}
Logout
Click Element css:[data-testid='logout-btn']
Wait Until Element Is Visible css:.login-form 10s
Page Object Pattern
Login Page (resources/pages/login_page.robot)
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${LOGIN_URL} /login
${EMAIL_FIELD} id:email
${PASSWORD_FIELD} id:password
${SUBMIT_BUTTON} css:button[type='submit']
${ERROR_MESSAGE} css:.error-message
${FORGOT_PASSWORD} css:a[href='/forgot-password']
*** Keywords ***
Open Login Page
Go To ${BASE_URL}${LOGIN_URL}
Wait Until Element Is Visible ${EMAIL_FIELD} 10s
Submit Login Form
[Arguments] ${email} ${password}
Input Text ${EMAIL_FIELD} ${email}
Input Text ${PASSWORD_FIELD} ${password}
Click Button ${SUBMIT_BUTTON}
Verify Login Error
[Arguments] ${expected_message}
Wait Until Element Is Visible ${ERROR_MESSAGE} 5s
Element Should Contain ${ERROR_MESSAGE} ${expected_message}
Verify Login Page Is Displayed
Location Should Contain ${LOGIN_URL}
Element Should Be Visible ${EMAIL_FIELD}
Data-Driven Testing
Template-Based (tests/web/login_data.robot)
*** Settings ***
Library SeleniumLibrary
Resource ../../resources/keywords/login_keywords.robot
Resource ../../config/variables.robot
Suite Setup Open Browser ${BASE_URL} ${BROWSER}
Suite Teardown Close All Browsers
*** Test Cases ***
Login With Various Users
[Template] Login And Verify Result
[email protected] admin123 Dashboard
[email protected] password123 Welcome
[email protected] viewer123 Read Only
[email protected] wrong Invalid credentials
*** Keywords ***
Login And Verify Result
[Arguments] ${email} ${password} ${expected_text}
Go To ${BASE_URL}/login
Enter Email ${email}
Enter Password ${password}
Click Login Button
Wait Until Page Contains ${expected_text} 10s
DataDriver with CSV
*** Settings ***
Library SeleniumLibrary
Library DataDriver file=data/login_data.csv encoding=utf-8
Resource ../../resources/keywords/login_keywords.robot
Suite Setup Open Browser ${BASE_URL} ${BROWSER}
Suite Teardown Close All Browsers
Test Template Login And Verify
*** Test Cases ***
Login with ${email} should show ${expected} Default UserData
*** Keywords ***
Login And Verify
[Arguments] ${email} ${password} ${expected}
Go To ${BASE_URL}/login
Enter Email ${email}
Enter Password ${password}
Click Login Button
Wait Until Page Contains ${expected} 10s
API Testing
REST API Tests (tests/api/users_api.robot)
*** Settings ***
Library RequestsLibrary
Library Collections
*** Variables ***
${API_URL} http://localhost:3000/api
*** Test Cases ***
Get Users Returns 200
[Tags] api smoke
${response}= GET ${API_URL}/users expected_status=200
Should Not Be Empty ${response.json()['data']}
${users}= Set Variable ${response.json()['data']}
Length Should Be ${users} 10
Create User Successfully
[Tags] api crud
${body}= Create Dictionary
... name=Alice Johnson
... [email protected]
... role=user
${headers}= Create Dictionary
... Content-Type=application/json
... Authorization=Bearer ${AUTH_TOKEN}
${response}= POST ${API_URL}/users
... json=${body} headers=${headers} expected_status=201
Should Be Equal ${response.json()['name']} Alice Johnson
Should Be Equal ${response.json()['email']} [email protected]
Get User By ID
[Tags] api
${response}= GET ${API_URL}/users/1 expected_status=200
Should Be Equal As Strings ${response.json()['id']} 1
Dictionary Should Contain Key ${response.json()} name
Dictionary Should Contain Key ${response.json()} email
Delete User Requires Authentication
[Tags] api security
${response}= DELETE ${API_URL}/users/1 expected_status=401
Update User
[Tags] api crud
${body}= Create Dictionary name=Updated Name
${headers}= Create Dictionary
... Content-Type=application/json
... Authorization=Bearer ${AUTH_TOKEN}
${response}= PUT ${API_URL}/users/1
... json=${body} headers=${headers} expected_status=200
Should Be Equal ${response.json()['name']} Updated Name
Custom Python Library
libraries/CustomLibrary.py
from robot.api.deco import keyword
from robot.api import logger
import json
import random
import string
class CustomLibrary:
"""Custom Robot Framework library for domain-specific keywords."""
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
@keyword("Generate Random Email")
def generate_random_email(self, domain="test.com"):
prefix = ''.join(random.choices(string.ascii_lowercase, k=8))
email = f"{prefix}@{domain}"
logger.info(f"Generated email: {email}")
return email
@keyword("Generate Test User Data")
def generate_test_user_data(self):
return {
"name": f"User {''.join(random.choices(string.ascii_letters, k=6))}",
"email": self.generate_random_email(),
"role": random.choice(["admin", "user", "viewer"]),
}
@keyword("Parse JSON Response")
def parse_json_response(self, response_text):
return json.loads(response_text)
@keyword("Verify Response Has Fields")
def verify_response_has_fields(self, response_dict, *fields):
missing = [f for f in fields if f not in response_dict]
if missing:
raise AssertionError(f"Missing fields: {', '.join(missing)}")
Using Custom Library in Tests
*** Settings ***
Library ../libraries/CustomLibrary.py
*** Test Cases ***
Create User With Generated Data
${user}= Generate Test User Data
Log Creating user: ${user}
${email}= Generate Random Email example.com
Should Contain ${email} @example.com
Parallel Execution with Pabot
# Run tests in parallel across suites
pabot --processes 4 tests/
# Run with shared resources
pabot --processes 4 --resourcefile resources.dat tests/
# Parallel with specific output
pabot --processes 4 --outputdir results/ tests/
CI/CD Integration
GitHub Actions
name: Robot Framework Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, firefox]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- name: Start application
run: python app.py &
- name: Run Robot tests
run: |
robot --variable BROWSER:${{ matrix.browser }} \
--variable HEADLESS:true \
--outputdir results/ \
--include smoke \
tests/
- uses: actions/upload-artifact@v4
if: always()
with:
name: robot-results-${{ matrix.browser }}
path: results/
Best Practices
- Keyword abstraction levels -- Test cases should be high-level (business language). Keywords in resource files handle the implementation. Never put locators in test files.
- Use resource files for organization -- Separate keywords by domain (login_keywords.robot, api_keywords.robot). Import them in test files via
Resource. - Variables files for environments -- Use different variable files for local, CI, and staging:
robot --variablefile config/variables_ci.robot tests/. - Tag everything -- Use tags like
smoke,regression,api,webfor selective execution. Run with--include smokeor--exclude slow. - Documentation on test cases -- Add
[Documentation]to every test case. It appears inreport.htmland helps team members understand test purpose. - Explicit waits over implicit -- Use
Wait Until Element Is Visiblewith timeout instead of relying on SeleniumLibrary's implicit wait for dynamic content. - Parallel execution with Pabot -- Use Pabot for parallel suite execution in CI. It reduces total run time significantly for large suites.
- Custom Python libraries for complex logic -- When keyword syntax becomes awkward for complex logic, write Python library classes with the
@keyworddecorator. - Separate locators from keywords -- Store locators in dedicated files (locators/login_locators.robot) and import them. This makes locator updates a single-file change.
- Upload results as CI artifacts -- Always upload
report.html,log.html, andoutput.xmlfrom CI runs for debugging failures.
Anti-Patterns
- Hardcoded locators in test cases -- Putting
css:.submit-btndirectly in test cases. Move locators to variables files or page resources. - Sleep instead of waits -- Using
Sleep 5sinstead ofWait Until Element Is Visible. Sleeps waste time on fast pages and are insufficient on slow ones. - Monolithic test files -- One
.robotfile with 100 test cases. Split by feature into manageable files. - No keyword abstraction -- Test cases with 20 low-level SeleniumLibrary calls. Extract custom keywords that describe business actions.
- Ignoring return values -- Not capturing return values from keywords:
${result}= Get Text css:.total. Without${result}=, the value is lost. - Tight coupling to locators -- Using XPath locators that match DOM structure:
//div[3]/span[2]/a. Usedata-testidor meaningful CSS selectors. - Not using tags -- Running the entire suite when only smoke tests are needed. Tag tests and use
--include/--exclude. - Overly complex keyword arguments -- Keywords with 10 arguments. Use dictionaries or split into smaller keywords.
- Skipping test documentation -- Tests without
[Documentation]produce reports that are hard to review. Always document the test purpose. - Not checking reports -- Running tests and only checking pass/fail without reviewing
log.html. The log shows step-by-step execution, screenshots, and timing.
Run Commands
# Run all tests
robot tests/
# Run specific suite
robot tests/web/login.robot
# Run with tags
robot --include smoke tests/
robot --exclude slow tests/
robot --include smoke --exclude wip tests/
# Run with variables
robot --variable BASE_URL:http://staging.example.com tests/
robot --variablefile config/variables_ci.robot tests/
# Output configuration
robot --outputdir results/ tests/
robot --log NONE --report NONE --output output.xml tests/
# Parallel with pabot
pabot --processes 4 tests/
# Rerun failed tests
robot --rerunfailed results/output.xml --output rerun.xml tests/
rebot --merge results/output.xml results/rerun.xml
Alternatives
Compare before choosing
alirezarezvani/claude-skills
research-ops-skills
Use when planning, funding, scoping, or synthesizing enterprise research across workstreams — clinical study design, R&D program finance, market sizing/surveys, or product/user research. Triggers on "design this clinical study", "what sample size", "R&D budget", "burn rate", "capitalize or expense", "TAM SAM SOM", "market sizing", "survey design", "segment the market", "plan user interviews", "usability test", "synthesize research insights". Forks context to route to one of four Research-Operati
PramodDutta/qaskills
Gauge Testing
Test automation with Gauge framework using Markdown specifications, step implementations in Java/Python/JavaScript/Ruby/C#, concepts, data-driven testing, and living documentation.
alirezarezvani/claude-skills
chaos-engineering
Use when planning, running, or learning from chaos engineering experiments. Triggers on "chaos experiment", "fault injection", "gameday", "resilience test", "blast radius", "steady state", "abort criteria", "Chaos Toolkit", "Chaos Mesh", "Litmus", "Gremlin", "AWS FIS", or any deliberate failure-injection question. Ships experiment designer, blast-radius calculator, and postmortem generator (all stdlib Python), 4 references on chaos principles + experiment design + attack taxonomy + tooling lands
PramodDutta/qaskills
TDD Patterns
Practice strict red-green-refactor test-driven development — write one failing test first, make it pass with the minimum code, then refactor under green, with worked cycles in Jest and pytest, AAA structure, and behavior-based test naming.