Skip to main content

Recordwright PyPI version

An extension for recording and playback of web interactions in Playwright.

While other interaction recorders generate code that you have to extend with your tests, Recordwright integrates the interactions into your test. The first time you run the test, the interaction is recorded, and the following time the recording is played back. If the interaction changes it can be simply recorded again. You do not need to rewrite the whole test.

Recordwright records every event and can also play back drag and drop operations.

Installation

To install Recordwright

pip install recordwright

Usage

The following example demonstates the usage of Recordwright

from playwright.sync_api import sync_playwright
from recordwright import install as install_recorder  # import Recordwright

if __name__ == "__main__":
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=False)
        page = browser.new_page()
        page.goto("https://demo.playwright.dev/todomvc")

        page.get_by_placeholder("What needs to be done?").wait_for()

        # injects the recording code into the page
        recorder = install_recorder(page)

        # if there is no replay file "todo.json, the recording is started and 
        # the result is stored in a replay file.
        # Otherwise the replay file will be replayed.
        recorder.interaction("todo", """
        - Click "What needs to be done"
        - Type "Test RecordWright"
        - Press Enter
        """)

        lis = page.get_by_test_id("todo-item")
        item = lis.first
        assert(item.inner_text() == "Test RecordWright")

        browser.close()

Metadata

Release files for recordwright 1.0.1

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

Source distribution (sdist)

Source distribution for recordwright 1.0.1
File Size Uploaded Provenance Actions
recordwright-1.0.1.tar.gz 43.8 kB Without provenance Details for recordwright-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recordwright 1.0.1
File Interpreter ABI Platform Actions
recordwright-1.0.1-py3-none-any.whl Python 3 none any Details for recordwright-1.0.1-py3-none-any.whl

Total release size: 87.6 kB

Release files / recordwright-1.0.1.tar.gz

Download URL recordwright-1.0.1.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6c815165f429386ebbe941402263fbe51d6cd75fe9a22be16673f4f7233d169f
BLAKE2b-256 checksum
How to use checksums
23ea2bd2c2f4acf45e63e1e4f6f79d1c57a0efde08d359534ddd05061b7261ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / recordwright-1.0.1-py3-none-any.whl

Download URL recordwright-1.0.1-py3-none-any.whl
Size 43.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31920d5429e56e8e478f712e22d93df8decf4b0b4595314ac4e4038924377e01
BLAKE2b-256 checksum
How to use checksums
afb68060ce6b8ee7d00b75fc793b29e8f5ba91da8f0c47fbd5e4e8e8de6e27d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for recordwright 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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