Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:MarketSquare Robotframework browser Pip Install Browser

From Leeroopedia
Knowledge Sources
Domains Package_Management, Installation
Last Updated 2026-02-12 04:00 GMT

Overview

Concrete tool for installing the robotframework-browser Python package and its dependencies provided by pip and defined in the project's pyproject.toml configuration files.

Description

The pip install robotframework-browser command installs the Browser library from PyPI along with all required dependencies. The package metadata is defined in two pyproject.toml files:

  • Main package (pyproject.toml): Defines the robotframework-browser package (version 19.12.5), its core dependencies, optional extras, and the rfbrowser CLI entry point.
  • BrowserBatteries package (browser_batteries/pyproject.toml): Defines the robotframework-browser-batteries package (version 19.12.5), which depends on robotframework-browser==19.12.5 and bundles prebuilt grpc_server / grpc_server.exe binaries.

The installation creates the rfbrowser command-line tool, which is the primary interface for post-install initialization, browser binary management, trace viewing, and other administrative operations.

Usage

Use this command whenever installing or upgrading the robotframework-browser library. The specific variant depends on the desired installation path:

  • Standard install: When you have Node.js and npm available and prefer the traditional workflow
  • BrowserBatteries install: When you want a self-contained setup without requiring Node.js
  • With linting: When you also want Robocop linting rules for Browser library keywords

Code Reference

Source Location

  • Repository: robotframework-browser
  • File: pyproject.toml
  • Lines: 1-181
  • File: browser_batteries/pyproject.toml
  • Lines: 1-46

Signature

# Standard installation
pip install robotframework-browser

# With BrowserBatteries (bundled NodeJS binaries)
pip install robotframework-browser[bb]

# With Robocop linting support
pip install robotframework-browser[robocop]

# Upgrade an existing installation
pip install -U robotframework-browser

Import

# After installation, the library is imported in Robot Framework as:
# *** Settings ***
# Library    Browser

# In Python code:
from Browser import Browser

I/O Contract

Inputs

Name Type Required Description
package specifier str Yes The PyPI package name, optionally with extras: robotframework-browser, robotframework-browser[bb], or robotframework-browser[robocop]
version constraint str No Optional version pinning (e.g., robotframework-browser==19.12.5)

Outputs

Name Type Description
installed packages directory structure Python packages installed into site-packages/: Browser/ package with all modules
rfbrowser CLI console script The rfbrowser entry point registered at Browser.entry.__main__:cli, available in the environment PATH

Usage Examples

Basic Example

# 1. Create and activate a virtual environment
python -m venv browser_env
source browser_env/bin/activate  # Linux/macOS
# browser_env\Scripts\activate   # Windows

# 2. Install the library
pip install robotframework-browser

# 3. Initialize Node.js dependencies and browser binaries
rfbrowser init

# 4. Verify the installation
rfbrowser --version

BrowserBatteries Example

# Install with bundled binaries (no Node.js required)
pip install robotframework-browser[bb]

# Install only browser binaries (no rfbrowser init needed)
rfbrowser install

# Verify
rfbrowser --version

Upgrade Example

# Upgrade the Python package
pip install -U robotframework-browser

# Clean old Node.js dependencies
rfbrowser clean-node

# Re-initialize with fresh dependencies
rfbrowser init

pyproject.toml Entry Point Definition

[project.scripts]
rfbrowser = "Browser.entry.__main__:cli"

[project.optional-dependencies]
robocop = [
    "robotframework-robocop>=6.10.0",
]
bb = [
    "robotframework-browser-batteries>=19.7.2",
]

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment