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.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

vedro_pw-0.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vedro_pw-0.1.1.tar.gz
  • Upload date:
  • Size: 12.4 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.1.tar.gz
Algorithm Hash digest
SHA256 9e27312536e4549893f8323b1f3e88ae58c96f46e519411cf18caf40a434872c
MD5 cbcbad0e58a750955c921406dd51a523
BLAKE2b-256 44a65383980ffee48fde05e4729bc1a6d663a259167e5a4f53a50d829a85e567

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vedro_pw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eadc90e83948b272d58152710d4a8a55c7cf9ba25177a88c6ecc8d96c436d73f
MD5 ce1408e54e6e26665b9cadbe3206156d
BLAKE2b-256 e2a74aa71680d39ef22ca0829b909be6f5ec1c5719306c4bed30f7a52121ef42

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