Skip to main content

robotframework-vibium

PyPI version Continuous integration

Robot Framework library based on Vibium for AI-native browser automation.

Vision

robotframework-vibium brings Vibium's modern browser interaction model into Robot Framework through clean, composable, and maintainable keywords.

Keyword Documentation

See keyword documentation for available keywords and more information about the library in general.

This README is a quick guide; Libdoc is the source of truth for the full API.

Installation

The recommended installation method is using pip:

pip install --upgrade robotframework-vibium

The --upgrade option can be omitted when installing for the first time. This installs the library and its dependencies (including Robot Framework and Vibium).

To install from the GitHub repository (latest main):

pip install git+https://github.com/Jhoan0714/robotframework-vibium.git

Compatibility

Component Supported Version
Python >=3.9
Robot Framework >=5.0
Vibium >=26.8.21,<26.9

Although Robot Framework supports older Python versions, this library follows Vibium's runtime requirements and therefore requires Python 3.9 or newer.

Quick Start

*** Settings ***
Library    Vibium

*** Test Cases ***
Basic Navigation
    Open Browser
    Go To    https://example.com
    ${text}=    Get Page Text
    Should Contain    ${text}    Example Domain
    Close Browser

Open Browser accepts optional launch arguments aligned with Vibium browser.start(): url= (remote BiDi WebSocket), engine= (chrome or firefox), channel= (release or beta, Firefox only), headless= (per browser; defaults to the library import headless=${TRUE/FALSE}), and headers= (HTTP headers for remote connect). When engine is omitted, Chrome is used unless VIBIUM_ENGINE is set. Without url=, Vibium may still connect via the VIBIUM_CONNECT_URL environment variable.

Locator Syntax

Locators use strategy:value (for example role:button or css:#login) and pass through to Vibium's Page.find(...). Use : rather than =, because = is Robot Framework's named-argument syntax and would not be treated as part of the locator.

Single locator

Two forms:

  1. CSS selector (default, no prefix) — forwarded as the positional selector argument of page.find. CSS is Vibium's default strategy.
  2. Semantic strategy (strategy:value) — forwarded as the matching keyword argument. The prefix is split on the first : only, so values may contain =, [, ] or extra : characters (essential for XPath).

Supported strategies: xpath, role, text, label, placeholder, testid, alt, title, near.

*** Test Cases ***
Single Locator Examples
    Click    input[name='q']
    Click    role:button
    Click    text:Log in
    Click    xpath:(//*[@name='q'])[1]
    Click    xpath://input[@id='email' and @type='text']

Combining multiple strategies

Every keyword accepts one or more locator tokens as separate Robot Framework arguments. They are merged into a single page.find(...) call—the same idea as combining role plus accessible name in richer browser automation APIs—and matches the Vibium CLI pattern vibium find role button --name "Log in".

Rules:

  • At most one CSS-selector positional (Vibium accepts only one).
  • Each semantic axis may appear at most once; duplicates raise an error.
*** Test Cases ***
Combined Locators
    Click    role:button    text:Log in
    Click    role:textbox   label:E-mail
    Click    .nav           role:link       text:Home

Shadow DOM pierce (>> / >>>)

To reach elements inside an open shadow root, use a pierce combinator in the locator string (same keywords as usual—no dedicated pierce keyword). Plain CSS without >> / >>> does not enter shadow trees.

Combinator Meaning
>> Cross one shadow boundary
>>> Cross any depth of nested open shadows

Prefer >> for one hop under a known host; >>> when shadows nest. Combinators chain (host >> nested >> target). CSS child > is not pierce.

*** Test Cases ***
Pierce Examples
    Get Text    my-card >> #shadow-text
    Click       my-card >> #shadow-btn
    Get Text    outer-host >>> #deep
    Get Text    outer-host >> inner-host >> #deep

Closed shadow roots are never entered. Nested find with scope=${element} is separate from pierce. See Libdoc and Vibium selectors.

Ergonomic value argument

Fill Text, Type Text, and Select Option accept a trailing value in two ways:

  1. Ergonomic — the last positional is the value / text / option.
  2. Explicit — pass it as a named argument (value= or text= for Type Text).

Ergonomic mode raises an error when the last positional looks like a locator (starts with a known strategy: prefix). Use the named form to disambiguate.

*** Test Cases ***
Ergonomic Value Examples
    # Ergonomic: value as last positional
    Fill Text       input#email                   user@example.com
    Fill Text       role:textbox    label:E-mail  user@example.com
    Type Text       css:#notes                    more text
    Select Option   css:#country                  US

    # Explicit named args
    Fill Text       role:textbox                  value=user@example.com
    Type Text       css:#notes                    text=more text
    Select Option   css:#country                  value=US

    # Required when the value itself looks like a locator
    Fill Text       input#comment                 value=role:admin

    # Clear a field
    Fill Text       input#search                  value=${EMPTY}

The following is rejected with a clear error (ambiguous last positional):

Fill Text    role:textbox    label:E-mail        # ERROR: looks like 2 locators, value missing

Development

python3.9 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest

End-to-end checks with real browser (from repository root):

robot --pythonpath src -d reports/acceptance tests/acceptance

Smoke-only run:

robot --pythonpath src -i smoke -d reports/acceptance tests/acceptance

See tests/acceptance/README.md for suite coverage and details.

The library scope is GLOBAL (one instance per Robot process). Pabot works with process isolation—each worker gets its own browser session pool. Details: #26.

License

Apache-2.0

Metadata

Release files for robotframework-vibium 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-vibium 1.0.0
File Size Uploaded
robotframework_vibium-1.0.0.tar.gz 89.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-vibium 1.0.0
File Interpreter ABI Platform
robotframework_vibium-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 160.1 kB

Release files / robotframework_vibium-1.0.0.tar.gz

Download URL robotframework_vibium-1.0.0.tar.gz
Size 89.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fe9af077bf6149a441e65a384d2cafdde4f8f0585943d40ffe4ca1043b64a764
BLAKE2b-256 checksum
How to use checksums
85b3e7976c87ce3ebfa88d33b8c1bb4a250b4df65f49dfe520992e113bf7a913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / robotframework_vibium-1.0.0-py3-none-any.whl

Download URL robotframework_vibium-1.0.0-py3-none-any.whl
Size 70.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9a0ba51ca4eebc97e41248921deb6891f62c5ba132df60bb246d01aefffade0
BLAKE2b-256 checksum
How to use checksums
fb5aa954fb5335ffb161c51895ea1830822171dbef76461c049c439a5d776031
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page