Skip to main content

widgetastic.patternfly5

Python Versions PyPI version github actions pre: black

Overview

This library offers Widgetastic Widgets for PatternFly v5/v6, serving as an extended iteration of widgetastic.patternfly4.

Built to extend widgetastic.core with Playwright as the browser automation engine, this library provides a robust and modern approach to UI testing for PatternFly components.

Note: The main branch now uses Playwright for browser automation. For the legacy Selenium implementation, please refer to the legacy-selenium-support branch.

Installation

# Install from PyPI
pip install widgetastic.patternfly5

# Or install from source
git clone https://github.com/RedHatQE/widgetastic.patternfly5.git
cd widgetastic.patternfly5
pip install -e .

Supported Components

Components

Charts:

Patterns

Development

Contribution guide

# clone the repo
git clone https://github.com/RedHatQE/widgetastic.patternfly5.git
cd widgetastic.patternfly5

# create a virtual environment
python3 -m venv .venv_pfy5
source .venv_pfy5/bin/activate

# update pip and its friends
pip install -U pip setuptools wheel

# install the package in editable mode
pip install -e .[dev]
# if you use zsh, pip install will fail. Use this instead:
pip install -e ".[dev]"

# install Playwright browsers for testing
playwright install chromium firefox
playwright install-deps

# setup pre-commit hooks
pre-commit install

Testing

The library includes comprehensive tests that run against the official PatternFly documentation pages:

Tests are powered by Playwright, providing fast, reliable, and modern browser automation.

Prerequisites

Before running tests, install Playwright browsers:

# Install Playwright (included in dev dependencies)
pip install -e ".[dev]"

# Install Playwright browsers
playwright install chromium firefox

# Install system dependencies (if needed)
playwright install-deps

Running Tests

Basic test execution:

# Run tests with default settings (chromium, v6, headed mode)
pytest -v

# Run tests against PatternFly v5
pytest -v --pf-version v5

# Run tests with Firefox
pytest -v --browser firefox

# Run tests in headless mode (no browser window)
pytest -v --headless

Advanced options:

# Run tests in parallel (speeds up execution)
pytest -v -n 3 --browser chromium --pf-version v6

# Run with slow motion for debugging (100ms delay between actions)
pytest -v --slowmo 100

# Run specific test file
pytest testing/components/test_button.py -v --browser firefox

# Run tests with coverage
pytest -v --cov=./ --cov-report=html

Available test options:

Option Choices Default Description
--browser chromium, firefox chromium Browser to use for testing
--pf-version v5, v6 v6 PatternFly version to test against
--headless flag False Run in headless mode (no UI)
--slowmo milliseconds 0 Slow down operations for debugging
-n number 1 Number of parallel workers (requires pytest-xdist)

Debugging Tests

When debugging, it's helpful to:

  1. Run tests in headed mode (without --headless) to see browser interactions
  2. Use --slowmo to slow down actions and observe what's happening
  3. Run a single test file or test function instead of the entire suite
  4. Reduce parallelism (-n 1 or remove -n flag) to avoid race conditions
# Debug specific test with visible browser and slow execution
pytest testing/components/test_modal.py::test_modal_basic -v --slowmo 1000

Metadata

Release files for widgetastic.patternfly5 26.7.21.0

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

Built distribution (wheel)

Table of built distributions (wheels) for widgetastic.patternfly5 26.7.21.0
File Interpreter ABI Platform
widgetastic_patternfly5-26.7.21.0-py3-none-any.whl Python 3 none any Details

Release files / widgetastic_patternfly5-26.7.21.0-py3-none-any.whl

Download URL widgetastic_patternfly5-26.7.21.0-py3-none-any.whl
Size 56.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b10ac566689a6036bfc84e4d240d61000eaaf984f666b5207e827f69d66b2386
BLAKE2b-256 checksum
How to use checksums
539dc7b642b12a60ef80a1235af55b649d8c50a85b7d663d1e2277e43180de8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log
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