robot-framework-skill
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 ***", ".robot", "SeleniumLibrary", "keyword-driven test".
What this skill does
# Robot Framework Skill
For TestMu AI cloud execution, see [reference/cloud-integration.md](reference/cloud-integration.md) and [shared/testmu-cloud-reference.md](../shared/testmu-cloud-reference.md).
## Core Patterns
### Basic Test (tests/login.robot)
```robot
*** Settings ***
Library SeleniumLibrary
Suite Setup Open Browser ${BASE_URL} chrome
Suite Teardown Close All Browsers
*** Variables ***
${BASE_URL} http://localhost:3000
${EMAIL} [email protected]
${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 [email protected]
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
```robot
*** 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 [email protected] password123
Verify Dashboard Is Displayed
```
### Data-Driven Tests (Template)
```robot
*** Test Cases ***
Login With Various Users
[Template] Login And Verify
[email protected] admin123 Dashboard
[email protected] pass123 Dashboard
[email protected] wrong Error
*** Keywords ***
Login And Verify
[Arguments] ${email} ${password} ${expected}
Login As User ${email} ${password}
Page Should Contain ${expected}
```
### API Testing (RequestsLibrary)
```robot
*** 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 protected]
${response}= POST ${API_URL}/users json=${body} expected_status=201
Should Be Equal ${response.json()['name']} Alice
```
### Cloud Config
```robot
*** 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 |
Related in e2e-testing
playwright-skill
IncludedGenerates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java, or C#. Supports local execution and TestMu AI cloud across 3000+ browser/OS combinations and real mobile devices. Use when the user asks to write Playwright tests, automate browsers, run cross-browser tests, test on real devices, debug flaky tests, mock APIs, or do visual regression. Triggers on: "Playwright", "E2E test", "browser test", "run on cloud", "cross-browser", "TestMu", "LambdaTest", "test my app", "test on mobile", "real device".
selenium-skill
IncludedGenerates production-grade Selenium WebDriver automation scripts and tests in Java, Python, JavaScript, C#, Ruby, or PHP. Supports local execution and TestMu AI cloud with 3000+ browser/OS combinations. Use when the user asks to write Selenium tests, automate with WebDriver, run cross-browser tests on Selenium Grid, or mentions "Selenium", "WebDriver", "RemoteWebDriver", "ChromeDriver", "GeckoDriver". Triggers on: "Selenium", "WebDriver", "browser automation", "Selenium Grid", "cross-browser", "TestMu", "LambdaTest".
cypress-skill
IncludedGenerates production-grade Cypress E2E and component tests in JavaScript or TypeScript. Supports local execution and TestMu AI cloud. Use when the user asks to write Cypress tests, set up Cypress, test with cy commands, or mentions "Cypress", "cy.visit", "cy.get", "cy.intercept". Triggers on: "Cypress", "cy.", "component test", "E2E test", "TestMu", "LambdaTest".
test-framework-migration-skill
IncludedMigrates and converts test automation scripts between Selenium, Playwright, Puppeteer, and Cypress. Use when the user asks to migrate, convert, or port tests from one framework to another; rewrite tests in a different framework; or switch from Selenium to Playwright, Playwright to Selenium, Puppeteer to Playwright, Cypress to Playwright, or vice versa. Triggers on: "migrate", "convert", "port", "selenium to playwright", "playwright to selenium", "puppeteer to playwright", "cypress to playwright", "rewrite tests in", "switch from [framework] to [framework]".
laravel-dusk-skill
IncludedGenerates Laravel Dusk browser tests in PHP. Chrome-based E2E testing for Laravel apps. Use when user mentions "Dusk", "Laravel Dusk", "$browser->visit", "DuskTestCase". Triggers on: "Laravel Dusk", "Dusk test", "$browser->visit", "DuskTestCase".
selenide-skill
IncludedGenerates Selenide tests in Java. Concise UI testing framework built on Selenium with automatic waits and fluent API. Use when user mentions "Selenide", "$(selector)", "shouldBe(visible)", "Selenide Java". Triggers on: "Selenide", "$() selector", "shouldBe", "shouldHave", "Selenide test".