Skip to main content

Integrates Playwright for automated browser testing with customizable configuration options

Project description

vedro-pw

Codecov PyPI PyPI - Downloads Python Version

The Playwright Plugin integrates Playwright with Vedro, enabling automated browser testing with a wide range of configurable options.

Installation

Quick

For a quick installation, you can use a plugin manager as follows:

$ vedro plugin install vedro-pw

Manual

To install manually, follow these steps:

  1. Install the package using pip:
$ pip3 install vedro-pw
  1. Next, activate the plugin in your vedro.cfg.py configuration file:
# ./vedro.cfg.py
import vedro
import vedro_pw


class Config(vedro.Config):
    class Plugins(vedro.Config.Plugins):
        class Playwright(vedro_pw.Playwright):
            enabled = True

Usage

Basic Scenario Example

Here's a simple Vedro scenario that opens the Playwright homepage and verifies the page title.

import vedro
from vedro_pw import opened_browser_page

class Scenario(vedro.Scenario):
    subject = "Open Playwright homepage"

    async def given(self):
        self.page = await opened_browser_page()

    async def when(self):
        await self.page.goto("https://playwright.dev/")

    async def then(self):
        assert await self.page.title() == "Playwright"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro_pw-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

vedro_pw-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file vedro_pw-0.1.0.tar.gz.

File metadata

  • Download URL: vedro_pw-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vedro_pw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2da2eceffe162b35a421384a4e2aa399e047a1faa42d2ed8cdad20d4d4a1ca8d
MD5 39f6dee86ca78f5e8bf2ba15c747e79f
BLAKE2b-256 87e1a2bd82cfb9f053c9fa863ad51502a4eec10fb2bd96625ff62b9efceca513

See more details on using hashes here.

File details

Details for the file vedro_pw-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vedro_pw-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vedro_pw-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e3fc4739e550dbf1274d1bcb8a02d6a715993ba37d9d90224e9f53fd0140fda
MD5 533cb0c734c914ac806f955dd8b746f1
BLAKE2b-256 c35014e44b0500789f44bcab807f6b84fa919ca07eb1554b3a8730a9674095cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page