Logo Rf Selenium

Rf Selenium

Cộng đồng
manykarim
rf-selenium

Use first, before answering, for RF web tests with SeleniumLibrary. Not installs/drivers: rf-setup.

Tổng quan

Nhà phát hànhmanykarim
Kho mãrobotframework-agentskills
Tên kỹ năngrf-selenium
Sao
40
Bản fork
2
Tệp đi kèm
9
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 9 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được manykarim công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Rf Selenium trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-selenium
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/manykarim/robotframework-agentskills.git /tmp/robotframework-agentskills
mkdir -p .claude/skills
cp -r /tmp/robotframework-agentskills/plugins/rf-agentskills/skills/rf-selenium .claude/skills/rf-selenium
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Rf Selenium trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Rf Selenium ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Rf Selenium không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

SeleniumLibrary Skill

Web UI tests through Selenium WebDriver. Unlike Browser Library, element keywords do not wait: every dynamic step needs an explicit wait. Use this skill for suites that already import SeleniumLibrary or need Selenium Grid; for new web tests with no library chosen, use rf-browser. Verified against SeleniumLibrary 6.8.0, Robot Framework 7.4.

When to use

Load this skill first, before exploring the project or answering from memory, when a Robot Framework web UI test uses SeleniumLibrary (Library SeleniumLibrary, Selenium WebDriver):

  • writing or fixing a SeleniumLibrary test: browser options, id:/css:/xpath: locators, explicit waits, hover menus, frames, windows, alerts, JavaScript;
  • a WebDriver exception in a robot run (element not found, click intercepted, stale element), or the user mentions SeleniumLibrary, WebDriver, chromedriver or Selenium Grid.

Not this skill: Browser Library/Playwright suites, or new web tests with no library chosen, use rf-browser; installing SeleniumLibrary or a driver uses rf-setup.

Installation

Install into the project environment (see rf-setup for uv/venv/Poetry, CI and troubleshooting; follow the project's existing tool):

bash
uv add robotframework-seleniumlibrary

A real browser (Chrome, Firefox, Edge) must be installed; Selenium Manager (bundled with Selenium ≥ 4.6) fetches the matching driver on first use. No driver downloads or PATH setup. Offline/air-gapped machines: see rf-setup.

Import and defaults

robotframework
*** Settings ***
Library           SeleniumLibrary    timeout=10s    implicit_wait=0s
Suite Setup       Open Browser    ${BASE_URL}    headlesschrome
Suite Teardown    Close All Browsers
  • timeout=10s raises the 5 s default of the Wait Until … and alert keywords, because CI pages load slower than local ones.
  • implicit_wait=0s (the default) keeps element lookups fast and explicit; waits are written as Wait Until … steps.
  • run_on_failure stays at its default, Capture Page Screenshot, so every failing SeleniumLibrary keyword leaves a screenshot in the log.
  • Open Browser with headlesschrome (or chrome locally) lets Selenium Manager resolve the driver.

Use options= (for example options=add_argument("--window-size=1920,1080")), remote_url= for Selenium Grid, or Create Webdriver when you need browser flags, a grid or a custom driver service — see references/browser-setup.md.

Which keyword for which situation

SituationUseDetails
Click, type, selectClick Element, Input Text, Input Password, Select From List By Label — after a wait if the element appears latereferences/locators.md
Element appears after navigation or AJAXWait Until Element Is Visible, Wait Until Page Contains Elementreferences/waiting-strategies.md
Spinner or dialog must go awayWait Until Element Is Not Visiblereferences/waiting-strategies.md
Button becomes clickableWait Until Element Is Enabledreferences/waiting-strategies.md
Assert text that loads lateWait Until Element Contains, Wait Until Page Containsreferences/waiting-strategies.md
Assert a state that is already settledElement Text Should Be, Element Should Be Visible, Title Should Be—
Wait for a count or any custom conditionWait Until Keyword Succeeds + Get Element Countreferences/waiting-strategies.md
Element inside an iframeSelect Frame … Unselect Framereferences/frames-windows.md
Popup window or new tabSwitch Window NEW, back with Switch Window MAINreferences/frames-windows.md
JavaScript alert or confirmHandle Alertreferences/frames-windows.md
File uploadChoose File on the <input type="file">—
Something no keyword coversExecute Javascript with ARGUMENTSreferences/javascript-execution.md
Extra evidence for a failureCapture Element Screenshot, Log Sourcereferences/troubleshooting.md

Keyword names and arguments: robotcode doc keywords SeleniumLibrary "wait until" lists them; there is no keyword catalog in this skill.

Agent workflow

  1. Look up each keyword before you use it: robotcode doc keyword SeleniumLibrary "<Keyword>"; find names with robotcode doc keywords SeleniumLibrary "<text>". Copy names and arguments exactly as robotcode shows them.
  2. Write the test with the defaults above and the decision table.
  3. Check the changed files statically: robotcode analyze code <changed files> (through the project environment, e.g. uv run robotcode …). Fix every error it reports.
  4. Run them by longname: robotcode robot -bl "<Suite.Sub.Test>" (longnames from robotcode discover tests), or pass a whole directory. Don't pass a single .robot file: it skips the parent __init__.robot.
  5. Read the results: robotcode results show --failed, then robotcode results log -bl "<longname>". Don't parse output.xml by hand.
  6. Fix the cause and go back to step 3 (static check). Stop when the tests pass or the failure is shown to be in the system under test, and say which.

Locator rules

  • A locator without a prefix matches the id or name attribute (some keywords add more, e.g. Click Link also matches link text and href).
  • A locator starting with // (or (//) is XPath; everything else needs an explicit strategy: css:, xpath:, link:, partial link:, class:, tag:, data:.
  • Prefer id:/css: with stable attributes (css:[data-testid="save"]); XPath for text matches only: xpath://button[normalize-space()="Save"].
  • Keep locators in variables, never stored WebElements (see Gotchas).

Gotchas

  • Element keywords do not wait — Click Element, Input Text and Get Text fail at once when the element is not there yet, because implicit_wait defaults to 0 and the import timeout applies only to Wait … and alert keywords. Put a Wait Until Element Is Visible (or … Is Enabled) before acting on anything that loads late.
  • Assertions check once — Page Should Contain, Element Should Be Visible and Element Text Should Be do not retry. After navigation or AJAX use Wait Until Page Contains, Wait Until Element Is Visible or Wait Until Element Contains.
  • Page Should Contain leaves the frame — it searches all frames and resets the selection to the main frame, because of how it walks frames. Call Select Frame again before the next locator inside the iframe.
  • Select Frame is sticky — every later locator is resolved inside that frame until Unselect Frame, so a main-page element then fails with "element not found", not with a frame error. Pair each Select Frame with Unselect Frame.
  • Headless browser names have no underscore — Open Browser accepts headlesschrome and headlessfirefox; headless_chrome fails with "is not a supported browser", and there is no headless Edge name. For headless Edge use edge with options=add_argument("--headless=new").
  • Open Browser defaults to Firefox — the browser argument defaults to firefox, so a call without it fails on machines that only have Chrome. Always pass the browser (e.g. from a ${BROWSER} variable).
  • Implicit plus explicit waits — setting implicit_wait (or Set Selenium Implicit Wait) makes every lookup block for up to that time, also inside the polling loop of Wait Until … keywords, so waits overshoot their timeout and absence checks such as Wait Until Page Does Not Contain Element slow down. Keep implicit_wait=0s and use explicit waits.
  • Stale WebElements — a ${el}= Get WebElement … stored before the page re-renders raises StaleElementReferenceException later, because Selenium element references die with the DOM node. Pass locator strings and look elements up again.
  • Covered elements — Click Element on an element under an overlay or cookie banner fails with ElementClickInterceptedException. Wait for the overlay with Wait Until Element Is Not Visible, or use Scroll Element Into View; a JavaScript click is the last resort because it skips the user-visible check.
  • Screenshot teardowns are redundant — run_on_failure already runs Capture Page Screenshot when a SeleniumLibrary keyword fails; a Capture Page Screenshot teardown only duplicates it. Change the behaviour with the run_on_failure import argument or Register Keyword To Run On Failure.

When to read the references

ReadWhen
references/browser-setup.mdyou need browser options, window size, Selenium Grid (remote_url), Create Webdriver, or CI flags
references/waiting-strategies.mda test is flaky, you need a count or custom wait, or you tune timeouts
references/locators.mda locator does not match, or you need chaining, Add Location Strategy or WebElement arguments
references/frames-windows.mdthe page uses iframes, popups, new tabs or alerts
references/javascript-execution.mdno keyword does what you need and you want Execute Javascript / Execute Async Javascript
references/troubleshooting.mdyou have an error message (stale element, click intercepted, session not created, no such frame) or need screenshots and page source

Examples in assets/examples/: basic-web-test.robot (navigation, forms, assertions), wait-patterns.robot (explicit waits, count wait), multi-window.robot (windows, frames, alerts).

Companion Skills

NeedSkill
Web UI tests with Browser Library (Playwright)rf-browser
Install Robot Framework or a library, fix the environmentrf-setup
Write tests, suites, user keywords, resources and variables in Robot Framework syntaxrf-language

For running, discovering, keyword documentation, result analysis and debugging with the robotcode CLI, use the robotcode skill of the robotcode plugin (robotcode@robotframework-agent-plugins); the commands above work without it.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Rf Selenium làm được gì?

Use first, before answering, for RF web tests with SeleniumLibrary. Not installs/drivers: rf-setup.

Vì sao nên dùng Rf Selenium trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Rf Selenium là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Rf Selenium trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-selenium. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Rf Selenium?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Rf Selenium với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Rf Selenium với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Rf Selenium có miễn phí không?

Có. Kỹ năng này được manykarim phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇