# marketsquare/robotframework-browser architecture

> Architecture diagram of the GitHub repository marketsquare/robotframework-browser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marketsquare/robotframework-browser
- Repository: https://github.com/marketsquare/robotframework-browser

## Overview

Robot Framework Browser exposes browser-automation keywords to Robot test authors. The principal workflow is a test calling a keyword through the Browser library, which sends requests through its Python Playwright client to a Node gRPC service; that service invokes Playwright against a browser and returns results. The keyword surface covers navigation, interaction, locators, evaluation, network, cookies, PDF and related capabilities. The README and source index establish the Python/Node split and many module references; unsampled handler internals and protocol details limit finer-grained call links.

Main entry points: [`Browser/browser.py`](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/browser.py) (Browser library), [`node/playwright-wrapper/grpc-service.ts`](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/grpc-service.ts) (gRPC service), [`Browser/playwright.py`](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/playwright.py) (gRPC client), [`Browser/keywords/browser_control.py`](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/browser_control.py) (Browser control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python["Python library"]
  node_facade["Browser library<br/>[browser.py]"]
  node_kwcontrol["Browser control<br/>[browser_control.py]"]
  node_kwinteraction["Page interaction<br/>[interaction.py]"]
  node_kwgetters["Page getters<br/>[getters.py]"]
  node_kwstate["Playwright state"]
  node_kwother["Other keywords"]
  node_assertions["Assertion polling"]
  node_pyclient["gRPC client<br/>[playwright.py]"]
end

subgraph group_node["Node service"]
  node_grpc["gRPC service<br/>[grpc-service.ts]"]
  node_nodecontrol["Browser control handlers<br/>[browser-control.ts]"]
  node_nodeinteraction["Interaction handlers<br/>[interaction.ts]"]
  node_nodegetters["Getter handlers<br/>[getters.ts]"]
  node_nodestate["Browser state"]
  node_locators["Locator handlers<br/>[locator-handler.ts]"]
  node_response["Response utilities<br/>[response-util.ts]"]
  node_loadreport["Load reporting<br/>[load-report.ts]"]
  node_protobuf["RPC schema<br/>[playwright.proto]"]
end

subgraph group_browser["Browser runtime"]
  node_playwright["Playwright"]
  node_browserengine["Browser engine"]
end

subgraph group_support["Automation support"]
  node_types["Argument types<br/>[data_types.py]"]
  node_logging["Robot logging<br/>[logger.py]"]
end

node_robot(("Robot test"))

node_robot -->|"calls keywords"| node_facade
node_facade -->|"exposes"| node_kwcontrol
node_facade -->|"exposes"| node_kwinteraction
node_facade -->|"exposes"| node_kwgetters
node_facade -->|"exposes"| node_kwstate
node_facade -->|"loads keywords"| node_kwother
node_facade -->|"uses client"| node_pyclient
node_facade -.->|"uses assertions"| node_assertions
node_facade -->|"uses types"| node_types
node_facade -->|"logs through"| node_logging
node_kwcontrol -.->|"sends requests"| node_pyclient
node_kwinteraction -.->|"sends requests"| node_pyclient
node_kwgetters -.->|"sends requests"| node_pyclient
node_kwstate -.->|"sends requests"| node_pyclient
node_pyclient -.->|"RPC requests"| node_grpc
node_grpc -->|"dispatches"| node_nodecontrol
node_grpc -->|"dispatches"| node_nodeinteraction
node_grpc -->|"dispatches"| node_nodegetters
node_grpc -->|"dispatches"| node_nodestate
node_grpc -->|"dispatches"| node_locators
node_grpc -->|"formats responses"| node_response
node_grpc -->|"wraps navigation"| node_loadreport
node_grpc -.->|"uses messages"| node_protobuf
node_nodestate -->|"launches browsers"| node_playwright
node_playwright -.->|"controls"| node_browserengine

click node_facade "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/browser.py"
click node_kwcontrol "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/browser_control.py"
click node_kwinteraction "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/interaction.py"
click node_kwgetters "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/getters.py"
click node_kwstate "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/playwright_state.py"
click node_kwother "https://github.com/marketsquare/robotframework-browser/tree/main/Browser/keywords"
click node_assertions "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/assertion_engine.py"
click node_pyclient "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/playwright.py"
click node_types "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/utils/data_types.py"
click node_logging "https://github.com/marketsquare/robotframework-browser/blob/main/Browser/utils/logger.py"
click node_grpc "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/grpc-service.ts"
click node_nodecontrol "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/browser-control.ts"
click node_nodeinteraction "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/interaction.ts"
click node_nodegetters "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/getters.ts"
click node_nodestate "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/playwright-state.ts"
click node_locators "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/locator-handler.ts"
click node_response "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/response-util.ts"
click node_loadreport "https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/load-report.ts"
click node_protobuf "https://github.com/marketsquare/robotframework-browser/blob/main/protobuf/playwright.proto"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_facade,node_kwcontrol,node_kwinteraction,node_kwgetters,node_kwstate,node_kwother,node_assertions,node_pyclient toneBlue
class node_grpc,node_nodecontrol,node_nodeinteraction,node_nodegetters,node_nodestate,node_locators,node_response,node_loadreport,node_protobuf toneAmber
class node_playwright,node_browserengine toneMint
class node_types,node_logging toneRose
class node_robot toneIndigo
```

## Components

### Python library

- [Browser library](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/browser.py): `Browser/browser.py`
- [Browser control](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/browser_control.py): `Browser/keywords/browser_control.py`
- [Page interaction](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/interaction.py): `Browser/keywords/interaction.py`
- [Page getters](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/getters.py): `Browser/keywords/getters.py`
- [Playwright state](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/keywords/playwright_state.py): `Browser/keywords/playwright_state.py`
- [Other keywords](https://github.com/marketsquare/robotframework-browser/tree/main/Browser/keywords): `Browser/keywords`
- [Assertion polling](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/assertion_engine.py): `Browser/assertion_engine.py`
- [gRPC client](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/playwright.py): `Browser/playwright.py`

### Node service

- [gRPC service](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/grpc-service.ts): `node/playwright-wrapper/grpc-service.ts`
- [Browser control handlers](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/browser-control.ts): `node/playwright-wrapper/browser-control.ts`
- [Interaction handlers](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/interaction.ts): `node/playwright-wrapper/interaction.ts`
- [Getter handlers](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/getters.ts): `node/playwright-wrapper/getters.ts`
- [Browser state](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/playwright-state.ts): `node/playwright-wrapper/playwright-state.ts`
- [Locator handlers](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/locator-handler.ts): `node/playwright-wrapper/locator-handler.ts`
- [Response utilities](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/response-util.ts): `node/playwright-wrapper/response-util.ts`
- [Load reporting](https://github.com/marketsquare/robotframework-browser/blob/main/node/playwright-wrapper/load-report.ts): `node/playwright-wrapper/load-report.ts`
- [RPC schema](https://github.com/marketsquare/robotframework-browser/blob/main/protobuf/playwright.proto): `protobuf/playwright.proto`

### Browser runtime

- **Playwright**
- **Browser engine**

### Automation support

- [Argument types](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/utils/data_types.py): `Browser/utils/data_types.py`
- [Robot logging](https://github.com/marketsquare/robotframework-browser/blob/main/Browser/utils/logger.py): `Browser/utils/logger.py`

### Other components

- **Robot test**

## Connections

- Robot test → Browser library: calls keywords (evidence: `README.md`)
- Browser library → Browser control: exposes (evidence: `Browser/browser.py`)
- Browser library → Page interaction: exposes (evidence: `Browser/browser.py`)
- Browser library → Page getters: exposes (evidence: `Browser/browser.py`)
- Browser library → Playwright state: exposes (evidence: `Browser/browser.py`)
- Browser library → Other keywords: loads keywords (evidence: `Browser/keywords/__init__.py`)
- Browser library → gRPC client: uses client (evidence: `Browser/browser.py`)
- Browser library → Assertion polling: uses assertions
- Browser library → Argument types: uses types (evidence: `Browser/browser.py`)
- Browser library → Robot logging: logs through (evidence: `Browser/browser.py`)
- Browser control → gRPC client: sends requests
- Page interaction → gRPC client: sends requests
- Page getters → gRPC client: sends requests
- Playwright state → gRPC client: sends requests
- gRPC client → gRPC service: RPC requests
- gRPC service → Browser control handlers: dispatches (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Interaction handlers: dispatches (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Getter handlers: dispatches (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Browser state: dispatches (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Locator handlers: dispatches (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Response utilities: formats responses (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → Load reporting: wraps navigation (evidence: `node/playwright-wrapper/grpc-service.ts`)
- gRPC service → RPC schema: uses messages
- Browser state → Playwright: launches browsers (evidence: `node/playwright-wrapper/playwright-state.ts`)
- Playwright → Browser engine: controls (evidence: `README.md`)
