Rf Browserのロゴ

Rf Browser

コミュニティ
manykarim
rf-browser

Use first, before answering, for RF web tests with Browser Library (Playwright): selectors.

概要

公開者manykarim
リポジトリrobotframework-agentskills
スキル名rf-browser
スター
40
フォーク
2
同梱ファイル
11
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 11個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    manykarimがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルRf BrowserをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-browser
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをその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-browser .claude/skills/rf-browser
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRf Browserを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にRf Browserを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Rf Browserは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Browser Library Skill

Browser Library drives Chromium, Firefox and WebKit through Playwright: auto-waiting actions, retrying assertions, one isolated context per session. It is the default for new web tests; for suites that already import SeleniumLibrary, use rf-selenium. Verified against Browser 19.14.2, 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 Browser Library (Library Browser, Playwright):

  • writing or fixing a web test: pages, contexts and tabs, CSS/text/XPath selectors including iframes and shadow DOM, auto-waiting, assertions with an operator, downloads, storage state;
  • a click or selector times out (TimeoutError: locator.click), or the user mentions Browser Library, Playwright or rfbrowser, even if they only say "browser lib";
  • a new web test with no library chosen yet: Browser Library is the default.

Not this skill: suites that import SeleniumLibrary or run on WebDriver/Selenium Grid use rf-selenium; installing the library or errors in its Node.js rfbrowser init step use 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-browser[bb]"
uv run rfbrowser install chromium

BrowserBatteries ([bb]) ships the Playwright wrapper, so no Node.js is needed. rfbrowser install downloads the browser binaries.

Node.js escape hatch — only if no BrowserBatteries wheel exists for your platform, or you need Node plugins (Node 22/24/26 LTS):

bash
uv add robotframework-browser
uv run rfbrowser init chromium

Don't mix the paths: rfbrowser install belongs to [bb], rfbrowser init to the Node.js path.

Import and defaults

Import the library without arguments; its defaults are the recommendation: strict mode on, timeout=10s for actions and waits, retry_assertions_for=1s, auto_closing_level=TEST, and a screenshot on every failing Browser keyword.

robotframework
*** Settings ***
Library           Browser
Suite Setup       Open Test Browser
Test Setup        New Page    ${URL}

*** Variables ***
${URL}            https://example.com

*** Keywords ***
Open Test Browser
    New Browser    chromium    headless=True
    New Context    viewport={'width': 1280, 'height': 800}

The browser and context opened in Suite Setup live until the suite ends; each test gets a fresh page that is closed at test end. Use a new context per test when tests must not share cookies or storage, or per user in multi-user tests — see references/browser-context-page.md. Reuse a login with storageState — see references/authentication-storage.md.

Which keyword for which situation

SituationUseDetails
Click, hover, checkClick, Hover, Check Checkbox (auto-wait for actionability)references/locators.md
Enter textFill Text; Type Text when key events matter; Fill Secret for passwords—
Choose from a <select>Select Options By select#country value US—
Assert text, URL, count, stateGetter + operator: Get Text h1 == Welcome, Get Url contains /home, Get Element Count li == 3references/assertion-engine.md
Wait for appear/disappearWait For Elements State .spinner hiddenreferences/assertion-engine.md
Wait for page load or an API callWait For Load State networkidle; Promise To Wait For Response **/api/items before the click, Wait For after itreferences/troubleshooting.md
Retry any getter until trueWait For Condition Text h1 == Donereferences/assertion-engine.md
Element inside an iframe or shadow DOMClick iframe#pay >>> button#submit; CSS pierces open shadow rootsreferences/iframes-shadow-dom.md
Popup, new tab, several pagesSwitch Page NEW, Get Page Ids, Close Pagereferences/browser-context-page.md
Log in once, reuse the sessionSave Storage State, then New Context storageState=${state}references/authentication-storage.md
Upload or download a fileUpload File By Selector; Promise To Wait For Download + Wait Forreferences/downloads-uploads.md
Run JavaScript on the pageEvaluate JavaScript ${None} () => document.title—

Agent workflow

  1. Look up each keyword before you use it: robotcode doc keyword Browser "<Keyword>"; find names with robotcode doc keywords Browser "<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.

Selector strategy

Prefer, in order: test ids ([data-testid="save"]), accessible roles (role=button[name="Save"]), short CSS, text (text=Save), XPath last. Narrow with >> chaining (.cart >> text=Remove) or >> nth=0 instead of long absolute paths. Details: references/locators.md.

Gotchas

  • Strict mode fails on several matches — actions and getters fail when a selector matches more than one element, because the import default is strict=True. Make the selector unique or add >> nth=0; switch it off for one scope with Set Strict Mode False only when the page really has duplicates.
  • A plain getter does not retry — ${t}= Get Text h1 followed by Should Be Equal checks once. Getters with an assertion operator (Get Text h1 == Welcome) retry for retry_assertions_for (default 1 s). Put the operator in the getter; for longer waits raise it with Set Retry Assertions For or use Wait For Condition, and never add Sleep.
  • Two different timeouts — timeout (default 10 s, Set Browser Timeout) bounds actions and waits; retry_assertions_for bounds assertion retries. A slow assertion needs the second one raised, not the first.
  • Wait Until Network Is Idle is deprecated — use Wait For Load State networkidle, or better wait for the element or response you need (Wait For Elements State, Wait For Response).
  • Fill Text sets the value in one step — it fills and fires one input event, so key handlers (autocomplete, masks) never see keystrokes. Use Type Text (keydown/keypress/keyup per character) or Press Keys there.
  • Fill Secret rejects ${password} — it takes a Robot Framework 7.4 Secret variable, or the name as $password / %ENV_VAR, so the value is not logged. A plain ${password} string fails; use Fill Text if hiding is not needed.
  • auto_closing_level=TEST closes what a test opened — contexts and pages created inside a test close when it ends; those from Suite Setup live until suite teardown. Open shared browser/context in Suite Setup. KEEP leaves browsers and the node process running and is meant for local development only, not CI.
  • New Page without a browser uses defaults — it silently runs New Browser and New Context with default values (headless Chromium, default viewport), so a viewport, storageState or httpCredentials you meant to set is missing. Call New Browser and New Context first.
  • Selector shortcuts — a selector starting with // or .. is XPath, one in quotes ("Login") is exact text, anything else is CSS; text=Login matches case-insensitively as a substring. A cell that starts with # is a Robot Framework comment: write id=login or \#login. XPath does not pierce shadow roots; frames need >>>.
  • No screenshot teardown needed — run_on_failure defaults to Take Screenshot fail-screenshot-{index}, so a Run Keyword If Test Failed Take Screenshot teardown only duplicates it.

When to read the references

ReadWhen
references/locators.mda selector is ambiguous, brittle, or needs chaining, nth=, :has() or role selectors
references/assertion-engine.mdyou need an operator other than ==/contains, validate, or custom wait logic
references/browser-context-page.mdseveral browsers, contexts or users; popups and tabs; video/tracing; closing levels
references/iframes-shadow-dom.mdan element sits inside an iframe or a web component
references/authentication-storage.mdreusing a login, HTTP auth, cookies or local/session storage
references/downloads-uploads.mda test uploads or downloads files
references/troubleshooting.mda run fails with an error message you need to decode

Examples in assets/examples/: basic-web-test.robot, form-handling.robot, authentication-flow.robot, iframe-shadow-dom.robot.

Companion Skills

NeedSkill
Web UI tests with SeleniumLibrary (WebDriver)rf-selenium
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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Rf Browser」では何ができますか?

Use first, before answering, for RF web tests with Browser Library (Playwright): selectors.

TypingMindでRf Browserを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Rf Browserはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRf Browserをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-browserを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Rf Browserを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Rf Browserは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRf Browserを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Rf Browser」は無料ですか?

はい。manykarimがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇