Robot Framework Skill
When to Use
Use this skill when you need generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions "Robot Framework", "*** Test Cases ", "SeleniumLibrary", ".robot file". Triggers on: "Robot Framework", " Test Cases ***",...
For TestMu AI cloud execution, see reference/cloud-integration.md and shared/testmu-cloud-reference.md.
Core Patterns
Basic Test (tests/login.robot)
*** Settings ***
Library SeleniumLibrary
Suite Setup Open Browser ${BASE_URL} chrome
Suite Teardown Close All Browsers
*** Variables ***
${BASE_URL} http://localhost:3000
${EMAIL} user@test.com
${PASSWORD} password123
*** Test Cases ***
Login With Valid Credentials
Go To ${BASE_URL}/login
Wait Until Element Is Visible id:email 10s
Input Text id:email ${EMAIL}
Input Text id:password ${PASSWORD}
Click Button css:button[type='submit']
Wait Until Element Is Visible css:.dashboard 10s
Page Should Contain Welcome
Location Should Contain /dashboard
Login With Invalid Credentials Shows Error
Go To ${BASE_URL}/login
Input Text id:email wrong@test.com
Input Text id:password wrong
Click Button css:button[type='submit']
Wait Until Element Is Visible css:.error 5s
Element Should Contain css:.error Invalid credentials
Custom Keywords
*** Keywords ***
Login As User
[Arguments] ${email} ${password}
Go To ${BASE_URL}/login
Input Text id:email ${email}
Input Text id:password ${password}
Click Button css:button[type='submit']
Verify Dashboard Is Displayed
Wait Until Element Is Visible css:.dashboard 10s
Page Should Contain Welcome
*** Test Cases ***
Valid Login Flow
Login As User user@test.com password123
Verify Dashboard Is Displayed
Data-Driven Tests (Template)
*** Test Cases ***
Login With Various Users
[Template] Login And Verify
admin@test.com admin123 Dashboard
user@test.com pass123 Dashboard
bad@test.com wrong Error
*** Keywords ***
Login And Verify
[Arguments] ${email} ${password} ${expected}
Login As User ${email} ${password}
Page Should Contain ${expected}
API Testing (RequestsLibrary)
*** Settings ***
Library RequestsLibrary
*** Test Cases ***
Get Users Returns 200
${response}= GET ${API_URL}/users expected_status=200
Should Not Be Empty ${response.json()['users']}
Create User
${body}= Create Dictionary name=Alice email=alice@test.com
${response}= POST ${API_URL}/users json=${body} expected_status=201
Should Be Equal ${response.json()['name']} Alice
Cloud Config
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub
*** Keywords ***
Open Cloud Browser
${caps}= Create Dictionary
... browserName=chrome browserVersion=latest
... LT:Options=${{{"build":"Robot Build","name":"Login Test","platform":"Windows 11","video":True}}}
Open Browser ${BASE_URL} remote_url=${REMOTE_URL} desired_capabilities=${caps}
Setup: pip install robotframework robotframework-seleniumlibrary robotframework-requests
Run: robot tests/ or robot --include smoke tests/
Report: report.html and log.html auto-generated
Deep Patterns
See reference/playbook.md for production-grade patterns:
| Section |
What You Get |
| §1 Project Setup |
Project structure, variable files, execution commands, pabot |
| §2 Web UI Testing |
Login tests with Page Objects, dynamic content, waits, modals |
| §3 API Testing |
CRUD with RequestsLibrary, error handling, validation, auth |
| §4 Data-Driven Testing |
DataDriver with CSV, FOR loops, bulk operations |
| §5 Custom Python Libraries |
@keyword decorator, resource tracking, test data generation |
| §6 Browser Library |
Playwright-based modern testing, network interception, responsive |
| §7 LambdaTest Integration |
Remote browser config, cross-browser suite, status reporting |
| §8 CI/CD Integration |
GitHub Actions with matrix strategy, pabot parallel, report merging |
| §9 Debugging Table |
12 common problems with causes and fixes |
| §10 Best Practices |
14-item Robot Framework checklist |
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
1---
2name: robot-framework-skill
3description: "Generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions \"Robot Framework\", \"*** Test Cases ***\", \"SeleniumLibrary\", \".robot file\"."
4risk: critical
5source: https://github.com/LambdaTest/agent-skills/tree/main/robot-framework-skill
6source_repo: LambdaTest/agent-skills
7source_type: community
8date_added: 2026-07-01
9license: MIT
10license_source: https://github.com/LambdaTest/agent-skills/blob/main/LICENSE
11metadata:
12 source: https://skillmd.com/skills/lambdatest/robot-framework-skill
13---
14
15# Robot Framework Skill
16## When to Use
17
18Use this skill when you need generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions "Robot Framework", "*** Test Cases ***", "SeleniumLibrary", ".robot file". Triggers on: "Robot Framework", "*** Test Cases ***",...
19
20
21For TestMu AI cloud execution, see [reference/cloud-integration.md](https://github.com/LambdaTest/agent-skills/tree/main/robot-framework-skill/reference/cloud-integration.md) and [shared/testmu-cloud-reference.md](https://github.com/LambdaTest/agent-skills/tree/main/robot-framework-skill/../shared/testmu-cloud-reference.md).
22
23## Core Patterns
24
25### Basic Test (tests/login.robot)
26
27```robot
28*** Settings ***
29Library SeleniumLibrary
30Suite Setup Open Browser ${BASE_URL} chrome
31Suite Teardown Close All Browsers
32
33*** Variables ***
34${BASE_URL} http://localhost:3000
35${EMAIL} user@test.com
36${PASSWORD} password123
37
38*** Test Cases ***
39Login With Valid Credentials
40 Go To ${BASE_URL}/login
41 Wait Until Element Is Visible id:email 10s
42 Input Text id:email ${EMAIL}
43 Input Text id:password ${PASSWORD}
44 Click Button css:button[type='submit']
45 Wait Until Element Is Visible css:.dashboard 10s
46 Page Should Contain Welcome
47 Location Should Contain /dashboard
48
49Login With Invalid Credentials Shows Error
50 Go To ${BASE_URL}/login
51 Input Text id:email wrong@test.com
52 Input Text id:password wrong
53 Click Button css:button[type='submit']
54 Wait Until Element Is Visible css:.error 5s
55 Element Should Contain css:.error Invalid credentials
56```
57
58### Custom Keywords
59
60```robot
61*** Keywords ***
62Login As User
63 [Arguments] ${email} ${password}
64 Go To ${BASE_URL}/login
65 Input Text id:email ${email}
66 Input Text id:password ${password}
67 Click Button css:button[type='submit']
68
69Verify Dashboard Is Displayed
70 Wait Until Element Is Visible css:.dashboard 10s
71 Page Should Contain Welcome
72
73*** Test Cases ***
74Valid Login Flow
75 Login As User user@test.com password123
76 Verify Dashboard Is Displayed
77```
78
79### Data-Driven Tests (Template)
80
81```robot
82*** Test Cases ***
83Login With Various Users
84 [Template] Login And Verify
85 admin@test.com admin123 Dashboard
86 user@test.com pass123 Dashboard
87 bad@test.com wrong Error
88
89*** Keywords ***
90Login And Verify
91 [Arguments] ${email} ${password} ${expected}
92 Login As User ${email} ${password}
93 Page Should Contain ${expected}
94```
95
96### API Testing (RequestsLibrary)
97
98```robot
99*** Settings ***
100Library RequestsLibrary
101
102*** Test Cases ***
103Get Users Returns 200
104 ${response}= GET ${API_URL}/users expected_status=200
105 Should Not Be Empty ${response.json()['users']}
106
107Create User
108 ${body}= Create Dictionary name=Alice email=alice@test.com
109 ${response}= POST ${API_URL}/users json=${body} expected_status=201
110 Should Be Equal ${response.json()['name']} Alice
111```
112
113### Cloud Config
114
115```robot
116*** Settings ***
117Library SeleniumLibrary
118
119*** Variables ***
120${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub
121
122*** Keywords ***
123Open Cloud Browser
124 ${caps}= Create Dictionary
125 ... browserName=chrome browserVersion=latest
126 ... LT:Options=${{{"build":"Robot Build","name":"Login Test","platform":"Windows 11","video":True}}}
127 Open Browser ${BASE_URL} remote_url=${REMOTE_URL} desired_capabilities=${caps}
128```
129
130## Setup: `pip install robotframework robotframework-seleniumlibrary robotframework-requests`
131## Run: `robot tests/` or `robot --include smoke tests/`
132## Report: `report.html` and `log.html` auto-generated
133
134## Deep Patterns
135
136See `reference/playbook.md` for production-grade patterns:
137
138| Section | What You Get |
139|---------|-------------|
140| §1 Project Setup | Project structure, variable files, execution commands, pabot |
141| §2 Web UI Testing | Login tests with Page Objects, dynamic content, waits, modals |
142| §3 API Testing | CRUD with RequestsLibrary, error handling, validation, auth |
143| §4 Data-Driven Testing | DataDriver with CSV, FOR loops, bulk operations |
144| §5 Custom Python Libraries | @keyword decorator, resource tracking, test data generation |
145| §6 Browser Library | Playwright-based modern testing, network interception, responsive |
146| §7 LambdaTest Integration | Remote browser config, cross-browser suite, status reporting |
147| §8 CI/CD Integration | GitHub Actions with matrix strategy, pabot parallel, report merging |
148| §9 Debugging Table | 12 common problems with causes and fixes |
149| §10 Best Practices | 14-item Robot Framework checklist |
150
151## Limitations
152
153- Use this skill only when the task clearly matches its upstream source and local project context.
154- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
155- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.