{"id":28234397,"url":"https://github.com/vedro-universe/vedro-pw","last_synced_at":"2026-03-02T03:05:52.094Z","repository":{"id":199052151,"uuid":"702044367","full_name":"vedro-universe/vedro-pw","owner":"vedro-universe","description":"Integrates Playwright for automated browser testing with customizable configuration options","archived":false,"fork":false,"pushed_at":"2025-09-29T19:15:03.000Z","size":169,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T03:22:13.841Z","etag":null,"topics":["vedro","vedro-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vedro-universe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-08T10:37:45.000Z","updated_at":"2025-09-29T19:15:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cefd841-11e0-4043-85d9-25f399cd6762","html_url":"https://github.com/vedro-universe/vedro-pw","commit_stats":null,"previous_names":["vedro-universe/vedro-pw"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vedro-universe/vedro-pw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedro-universe%2Fvedro-pw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedro-universe%2Fvedro-pw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedro-universe%2Fvedro-pw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedro-universe%2Fvedro-pw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vedro-universe","download_url":"https://codeload.github.com/vedro-universe/vedro-pw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedro-universe%2Fvedro-pw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vedro","vedro-plugin"],"created_at":"2025-05-18T22:13:39.124Z","updated_at":"2026-03-02T03:05:52.089Z","avatar_url":"https://github.com/vedro-universe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vedro-pw\n\n[![Codecov](https://img.shields.io/codecov/c/github/vedro-universe/vedro-pw/main.svg?style=flat-square)](https://codecov.io/gh/vedro-universe/vedro-pw)\n[![PyPI](https://img.shields.io/pypi/v/vedro-pw.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-pw/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/vedro-pw?style=flat-square)](https://pypi.python.org/pypi/vedro-pw/)\n[![Python Version](https://img.shields.io/pypi/pyversions/vedro-pw.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-pw/)\n\nThe `vedro-pw` plugin allows you to use [Playwright](https://playwright.dev/) within your [Vedro](https://vedro.io/) scenarios for end-to-end testing of web applications.\n\n## Installation\n\n\u003cdetails open\u003e\n\u003csummary\u003eQuick\u003c/summary\u003e\n\u003cp\u003e\n\nFor a quick installation, you can use a plugin manager as follows:\n\n```shell\n$ vedro plugin install vedro-pw\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eManual\u003c/summary\u003e\n\u003cp\u003e\n\nTo install manually, follow these steps:\n\n1. Install the package using pip:\n\n```shell\n$ pip install vedro-pw\n```\n\n2. Next, activate the plugin in your `vedro.cfg.py` configuration file:\n\n```python\n# ./vedro.cfg.py\nimport vedro\nimport vedro_pw\n\n\nclass Config(vedro.Config):\n    class Plugins(vedro.Config.Plugins):\n        class Playwright(vedro_pw.Playwright):\n            enabled = True\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Usage\n\nUse the provided context functions in your scenarios to interact with Playwright:\n\n- `launched_browser`: Launches a local or remote browser based on the configuration.\n- `created_browser_context`: Creates a new browser context.\n- `opened_browser_page`: Opens a new page in the browser context.\n\n### Basic Example\n\nHere's a simple Vedro scenario that opens the Playwright homepage and verifies the page title.\n\n```python\nimport vedro\nfrom vedro_pw import opened_browser_page, expect\n\nclass Scenario(vedro.Scenario):\n    subject = \"Open Playwright homepage\"\n\n    async def given(self):\n        self.page = await opened_browser_page()\n\n    async def when(self):\n        await self.page.goto(\"https://playwright.dev/\")\n\n    async def then(self):\n        assert await expect(self.page).to_have_title(\"Playwright\")\n```\n\n## Command-Line Options\n\nThe plugin adds several command-line arguments for flexibility:\n\n| Option                 | Description                                                             | Default               |\n|------------------------|-------------------------------------------------------------------------|-----------------------|\n| `--pw-browser`         | Browser to use (`chromium`, `firefox`, `webkit`)                        | `chromium`            |\n| `--pw-headed`          | Run browser in headed mode                                              | `False`               |\n| `--pw-headless`        | Run browser in headless mode                                            | `True`                |\n| `--pw-slowmo`          | Delay operations by specified milliseconds                              | `0`                   |\n| `--pw-remote`          | Connect to a remote browser instance                                    | `False`               |\n| `--pw-remote-endpoint` | WebSocket endpoint for remote browser                                   | `ws://localhost:3000` |\n| `--pw-screenshots`     | Screenshot capturing (`always`, `on-failure`, `on-reschedule`, `never`) | `never`               |\n| `--pw-video`           | Video recording (`always`, `on-failure`, `on-reschedule`, `never`)      | `never`               |\n| `--pw-trace`           | Trace recording (`always`, `on-failure`, `on-reschedule`, `never`)      | `never`               |\n| `--pw-device`          | Emulate a specific device                                               | `None`                |\n| `--pw-debug`           | Enable Playwright debug mode by setting `PWDEBUG=1`                     | `False`               |\n| `--pw-open-last-trace` | Open the last captured Playwright trace after the test run              | `False`               |\n\n### Example Usage\n\n```shell\n$ vedro run --pw-browser=firefox --pw-headed --pw-screenshots=on-failure\n```\n\n### Capture Modes\n\n`CaptureMode` determines when to capture artifacts:\n\n- `never`: Do not capture.\n- `on-failure`: Capture only when a scenario fails.\n- `on-reschedule`: Capture when a scenario is rescheduled.\n- `always`: Always capture.\n\nArtifacts like screenshots, videos, and traces are attached to the scenario results and can be used in reports.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedro-universe%2Fvedro-pw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedro-universe%2Fvedro-pw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedro-universe%2Fvedro-pw/lists"}