robot-framework-skill – skill Lập trình cho agent AI
Tạo test Robot Framework theo cú pháp keyword-driven bằng Python. Hỗ trợ SeleniumLibrary, RequestsLibrary và keyword tùy chỉnh. Dùng khi người dùng nhắc đến "Robot Framework", "*** Test Cases ***", "SeleniumLibrary", ".robot file".
Cài skill robot-framework-skill bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/robot-framework-skill-e53a3.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /robot-framework-skill – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/robot-framework-skill-e53a3.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $robot-framework-skill – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/robot-framework-skill-e53a3.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /robot-framework-skill – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/robot-framework-skill-e53a3.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /robot-framework-skill – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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](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).
The playbook/cloud references are external, not bundled. Verify installed Robot/SeleniumLibrary/RequestsLibrary versions, imports (Collections for Create Dictionary), variables and actual capabilities schema. Use a fresh session per authentication test so successful login state cannot contaminate failure cases. Cloud credentials/session URLs, screenshots and Robot logs may expose secrets/PII; redact reports, authorize remote test-data transfer and costs, and use isolated synthetic accounts. POST examples create real data: define fixture ownership and cleanup before running.
Core Patterns
Basic Test (tests/login.robot)
*** Settings ***
Library SeleniumLibrary
Test Setup Open Browser ${BASE_URL} chrome
Test Teardown Close Browser
*** 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 Password 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 Password id:password wrong
Click Button css:button[type='submit']
Wait Until Element Is Visible css:.error 5s
Element Should Contain css:.error Invalid credentialsCustom Keywords
*** Keywords ***
Login As User
[Arguments] ${email} ${password}
Go To ${BASE_URL}/login
Input Text id:email ${email}
Input Password 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 DisplayedData-Driven Tests (Template)
*** 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)
*** 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']} AliceCloud 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.
Skill liên quan
- robots-txt-validator – Robots.txt Validator. Dùng khi làm việc với nội dung robots.txt, crawler và URL cần kiểm…
- ruby – Hướng dẫn mã nguồn chuyên sâu theo ngôn ngữ cho Ruby.
- ruby-pro – Viết mã Ruby đúng chuẩn idiom với metaprogramming, mẫu Rails và tối ưu hiệu năng. Chuyên…
- runapi-cli – Tạo ảnh, video và nhạc/âm thanh bằng AI từ agent sử dụng RunAPI CLI.
- rust – Hướng dẫn mã nguồn chuyên sâu theo ngôn ngữ cho Rust.
- rust-async-patterns – Làm chủ lập trình bất đồng bộ trong Rust với Tokio, async trait, xử lý lỗi và các mẫu…
- rust-pro – Làm chủ Rust 1.75+ với các mẫu async hiện đại, tính năng hệ thống kiểu nâng cao và lập…
- salary-benchmarking – Sổ đăng ký benchmark lương: vai trò, phòng ban và cấp bậc so với mức tối thiểu, trung vị…