zuke.tools.playwright
@zuke/playwright 1.2.0: @zuke/playwright — typed PlaywrightTasks wrappers for the Playwright CLI, for use in Zuke build targets (end-to-end browser testing).
zuke on PyPI ↗ 6 symbols
Symbols
class PlaywrightCodegenSettings(PlaywrightSettings) Settings for playwright codegen.
-
url(value: str) -> SelfThe URL to open for recording; omit to start blank.
-
target(language: str) -> SelfThe output language (
--target=, e.g.javascript,python). -
output(path: str) -> SelfWrite the generated script to a file (
--output=).
class PlaywrightInstallSettings(PlaywrightSettings) Settings for playwright install (browser binaries).
-
browsers(*names: str) -> SelfBrowsers to install (e.g.
chromium); omit to install all. -
with_deps() -> SelfAlso install the OS dependencies (
--with-deps).
class PlaywrightSettings(ToolSettings) Base for all Playwright subcommand settings: binary is playwright.
class PlaywrightShowReportSettings(PlaywrightSettings) Settings for playwright show-report.
-
dir(path: str) -> SelfThe report directory to open; omit for the default.
class PlaywrightTasks Typed task functions for the Playwright CLI.
-
static async test(ctx: ServiceContext, configure: Callable[[PlaywrightTestSettings], PlaywrightTestSettings] | None=None) -> ExecResultRun the test suite:
playwright test. -
static async install(ctx: ServiceContext, configure: Callable[[PlaywrightInstallSettings], PlaywrightInstallSettings] | None=None) -> ExecResultInstall browser binaries:
playwright install. -
static async show_report(ctx: ServiceContext, configure: Callable[[PlaywrightShowReportSettings], PlaywrightShowReportSettings] | None=None) -> ExecResultOpen the HTML report:
playwright show-report. -
static async codegen(ctx: ServiceContext, configure: Callable[[PlaywrightCodegenSettings], PlaywrightCodegenSettings] | None=None) -> ExecResultRecord interactions into a script:
playwright codegen.
class PlaywrightTestSettings(PlaywrightSettings) Settings for playwright test.
-
project(*names: str) -> SelfRestrict to the named project(s) (
--project=); repeatable. -
grep(pattern: str) -> SelfOnly run tests matching the pattern (
--grep). -
headed() -> SelfRun in headed browsers (
--headed). -
ui() -> SelfOpen the interactive UI mode (
--ui). -
workers(count: float) -> SelfSet the number of parallel workers (
--workers=). -
reporter(name: str) -> SelfChoose the reporter (
--reporter=). -
update_snapshots() -> SelfUpdate snapshots instead of failing on a mismatch (
--update-snapshots). -
config(path: str) -> SelfUse a specific config file (
--config=). -
paths(*filters: str) -> SelfTest file or directory filters to run; omit to run all tests.