agentleFS
MarketSquareMarketSquare/robotframework-browser/AGENTS.md

robotframework-browser

AGENTS.md663 starsChanged 6 days agoApache-2.0View on GitHub

A Robot Framework library on top of Playwright. Python keywords (Browser/) call a Node.js Playwright wrapper (node/playwright-wrapper/) over gRPC (protobuf/playwright.proto), so a keyword change usually touches all three. Supports Python 3.11+, Node 22/24/26 and Robot Framework 7.1.1+. The Robot Framework floor lives in pyproject.toml and in the rf-version of the CI matrix; change both together. - Browser/browser.py: Browser(DynamicCore), the library class. It owns global and scoped state (scope_stack). - Browser/keywords/: one keyword class per feature area, each extending LibraryComponent (Browser/base/librarycomponent.py).…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository7 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After a change to the proto, the TypeScript wrapper, or a keyword signature or docstring, run inv node-build.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

robotframework-browser

A Robot Framework library on top of Playwright. Python keywords (Browser/) call a Node.js Playwright wrapper (node/playwright-wrapper/) over gRPC (protobuf/playwright.proto), so a keyword change usually touches all three. Supports Python 3.11+, Node 22/24/26 and Robot Framework 7.1.1+. The Robot Framework floor lives in pyproject.toml and in the rf-version of the CI matrix; change both together.

Where things are

  • Browser/browser.py: Browser(DynamicCore), the library class. It owns global and scoped state (scope_stack).
  • Browser/keywords/: one keyword class per feature area, each extending LibraryComponent (Browser/base/librarycomponent.py).
  • Browser/assertion_engine.py: @with_assertion_polling. The assertion helpers (verify_assertion and friends) come from the assertionengine package.
  • node/playwright-wrapper/grpc-service.ts: one handler per rpc. playwright-state.ts owns the browser, context and page lifecycle. playwright-invoke.ts has findLocator, which resolves selectors, strict mode and frames for almost every keyword.
  • node/dynamic-test-app/: the Test App that the acceptance tests drive.
  • tools/ci_failures/: maintainers' analysis of CI failures.

GLOSSARY-MAP.md lists the domain contexts and where each GLOSSARY.md lives, and docs/adr/ holds the decisions. Read the relevant ones before changing how a keyword call reaches its body (the Robot Framework path and the Python path differ on purpose), the Test App logging, or tools/ci_failures.

Generated files

These are gitignored and regenerated; edit their sources instead.

FilesRegenerated by
Browser/generated/, node/playwright-wrapper/generated/inv protobuf
Browser/wrapper/, Browser/browser.pyi, mypy_stub/inv node-build
node/dynamic-test-app/dist/inv create-test-app

Build and test

Set up once with python bootstrap.py, activate .venv, then inv build. inv build syncs the Python dependencies from uv.lock on every run, but the Node dependencies and Playwright browsers only when package-lock.json changed since the last install. inv deps --force reinstalls them, for example after a broken browser install. PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD skips the browsers. Python dependencies live in pyproject.toml, the development ones in [dependency-groups]; after changing one, run uv lock. inv version relocks too.

After a change to the proto, the TypeScript wrapper, or a keyword signature or docstring, run inv node-build. It regenerates protobuf, the wrapper and browser.pyi. inv atest and inv utest test the last build of the wrapper and never rebuild it. inv atest does rebuild the Test App.

  • inv utest: pytest. Importing Browser needs the generated protobuf. test_python_usage.py, test_screenshot.py, test_secrets.py and test_shared_playwright_port.py launch Node and a real browser. Tests that need the built Test App take the session-scoped test_app_url fixture (utest/conftest.py); it starts the app through atest/library/test_app_server.py, the same start-and-retry code the acceptance tests use. test_close_deadline.py, test_python_arguments.py and test_rfbrowser_browser_choices.py start Node without a browser, and test_on_failure_after_test_timeout.py does so from a Robot Framework run. One file: inv utest --suite utest/test_x.py.
  • inv utest-node: Jest, in node/playwright-wrapper/__tests__/.
  • inv atest --suite <name> (or --test, --include): pabot, with one Node process shared by every worker. Results land in atest/output/; inv atest-failed reruns the failures.
  • inv lint: lint-python (ruff format and check, mypy; --fix fixes), lint-node (prettier, eslint, tsc --noEmit) and lint-robot (robocop format). Locally lint-node and lint-robot rewrite files; in CI they only check.
  • Coverage: inv coverage runs every suite and merges the report; see inv --help coverage.

CI (.github/workflows/on-push.yml) is the only gate; there are no git hooks.

Rules

  • A new keyword needs a need. The keyword count stays low on purpose. First try extending an existing keyword, a better assertion, or one higher-level keyword that combines Playwright calls. A new keyword needs Playwright functionality that can only be exposed as a keyword, or a user need that is generally useful. State that plugins or test helpers need goes on an internal Browser property. The change-keyword skill walks through any keyword change.
  • Keyword docstrings are the documentation. They explain intent, what each argument does, and show examples. Code and tests carry minimal comments; names explain them.
  • Keyword annotations stay narrow (button: MouseButton). Python callers get argument conversion instead; widened types belong only in the generated browser.pyi (ADR 0006).
  • State flows from Browser. LibraryComponent delegates to typed properties on Browser (ADR 0009).
  • Plugins: atest/test/09_Plugins/ExamplePlugin.py is the worked example CI runs. User docs: https://robotframework-browser.org/docs/extending/python-plugins

Versions and releases

Browser/version.py is the source; inv version <VERSION> writes it to every other file. The release steps are in CONTRIBUTING.md. Its Issues section says which issue type a change needs: only Bug and Feature issues reach the release notes, never Task.

Skills

Project skills are in .claude/skills/, one folder each with a SKILL.md. Load the one whose description matches the task.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.