MarketSquare / MarketSquare/robotframework-browser

No documentation for using Browser from Python without Robot Framework

Open
#5,164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: medium
Dominant language
Python
Stars
655
Forks
147
Avg merge
5h 27m
Merged PRs (30d)
59

Description

Browser keywords can be called from a plain Python script with no Robot Framework run anywhere, and argument conversion makes this a supported way to use the library. There is no documentation for it.

Two behaviours are specific to this context, and both are already measured:

  • browser.outputdir is the current working directory. Browser/browser.py:829 falls back to self._output_dir when EXECUTION_CONTEXTS.current is empty, so screenshots, videos, traces and the Playwright log land wherever the script was started from.
  • validate and then raise RobotNotRunningError: Cannot access execution context. All 31 keywords taking an AssertionOperator still accept and convert the operator — only these two operators' execution needs a Robot Framework run. This is pre-existing and outside the library's control.

Neither holds under Robot Framework. In particular they do not hold when a user's own library owns the Browser instance: Robot Framework is still running, so ${OUTPUTDIR} resolves and BuiltIn().evaluate works. Conflating "no Robot Framework" with "not imported by Robot Framework" is the mistake this issue exists to prevent.

Where it belongs

One closing section on /docs/extending/browser-as-a-base, once that page exists. The two pages covering the Robot Framework-hosted cases are specced in the site repository as docs/superpowers/specs/2026-08-16-python-extension-docs.md, and this case is explicitly out of scope there.

Parking it costs nothing today: the argument-conversion behaviour is documented by those two pages regardless, because it applies to any call reaching a keyword through attributes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read Browser/browser.py:829 to confirm the output-directory fallback, then review docs/superpowers/specs/2026-08-16-python-extension-docs.md and the planned /docs/extending/browser-as-a-base page. Once that page exists, add a closing section covering plain Python usage, output location, and the validate/then limitation; done when the documented behavior matches the two measured cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.