Skip to main content

Vedro + playwright

Project description

Vedro Playwright Plugin

PyPI PyPI - Downloads Python Version

Vedro + playwright

(forked from vedro-pyppeteer)


1. Install package

$ pip3 install vedro-playwright
$ playwright install

2. Enable plugin

# ./
import vedro
import vedro_playwright as playwright

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class Playwright(playwright.Playwright):
            enabled = True


# ./scenarios/
import vedro
from vedro_playwright import BrowserEngine as Browser
from vedro_playwright import opened_firefox_page, opened_chromium_page, opened_webkit_page

class Scenario(vedro.Scenario):
    subject = "reset password (via {browser})"

    @vedro.params(Browser.CHROMIUM, opened_chromium_page)
    @vedro.params(Browser.FIREFOX, opened_firefox_page)
    @vedro.params(Browser.WEBKIT, opened_webkit_page)
    def __init__(self, browser, opened_page):
        self.opened_page = opened_page

    async def given_opened_app(self): = await self.opened_page()

    async def given_filled_email(self):
        form_email ="#form-email")
        await form_email.type("user@email")

    async def when_user_submits_form(self):

    async def then_it_should_redirect_to_root_page(self):
        pathname = await"window.location.pathname")
        assert pathname == "/"
$ vedro run --playwright-screenshots=on_fail




Mode Description
every_step Save screenshots for every step
only_failed Save screenshots only for failed steps
on_fail Save screenshots for all steps when scenario fails

--playwright-screenshots-dir — Set directory for screenshots (default: ./screenshots)


Documentation for Playwright available here

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-playwright-1.2.0.tar.gz (10.3 kB view hashes)

Uploaded source

Built Distribution

vedro_playwright-1.2.0-py3-none-any.whl (11.2 kB view hashes)

Uploaded py3

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