---
title: Playwright Java configuration
description: Configuration properties for Allure Playwright Java | Control step recording, artifact capture, and parameter redaction via allure.properties
---

# Allure Playwright Java configuration

This page describes the configuration options that affect the behavior of [Allure Playwright Java](/docs/playwright-java/).

To set the configuration options, create an `allure.properties` file in your project's `src/test/resources` directory.

```properties
# src/test/resources/allure.properties
allure.playwright.steps.enabled=true
allure.playwright.steps.mode=actions
allure.playwright.parameters=redacted
allure.playwright.screenshots.attach=true
allure.playwright.failure.screenshot=true
allure.playwright.failure.page-source=true
allure.playwright.close.trace=true
allure.playwright.close.video=true
allure.playwright.close.page-logs=true
```

## allure.playwright.steps.enabled

```properties
allure.playwright.steps.enabled=true
```

Whether to record Playwright API calls as Allure steps at all. Set to `false` to disable all automatic step recording while keeping artifact capture active. Defaults to `true`.

## allure.playwright.steps.mode

```properties
allure.playwright.steps.mode=actions
```

Controls which Playwright API methods are recorded as steps.

- `actions` (default) — records recognized browser interaction methods and Playwright assertions. This includes navigation (`navigate`, `reload`, `goBack`, `goForward`), interactions (`click`, `dblclick`, `fill`, `type`, `hover`, `check`, `uncheck`, `press`, `tap`, `focus`, `blur`, `clear`, `dragTo`, `dragAndDrop`, `selectOption`, `setInputFiles`, `dispatchEvent`, and more), wait methods (`waitForSelector`, `waitForNavigation`, `waitForURL`, `waitForTimeout`, and others), and all Playwright assertion methods, on `Page`, `Frame`, `Locator`, and `ElementHandle`.
- `all` — records every public method call on the intercepted Playwright types, except `equals`, `hashCode`, `toString`, and `not`.

Use `all` when you need full API call visibility for debugging. For most projects, `actions` produces a cleaner report.

## allure.playwright.parameters

```properties
allure.playwright.parameters=redacted
```

Controls whether sensitive values passed to Playwright actions appear in step names.

- `redacted` (default) — replaces values passed to `fill()`, `type()`, and `press()` with `<redacted>` in the step name. For example:
  - `page.fill("#password", "secret")` → `Fill #password with <redacted>`
  - `page.type("#comment", "text")` → `Type <redacted> into #comment`
- Any other value (e.g., `plain`) — includes the actual argument value in the step name.

Keep the default when your tests interact with password fields, tokens, or other sensitive inputs.

## allure.playwright.screenshots.attach

```properties
allure.playwright.screenshots.attach=true
```

Whether to attach the image returned by `page.screenshot()`, `locator.screenshot()`, or `elementHandle.screenshot()` to the corresponding Allure step. Defaults to `true`.

When enabled, the screenshot bytes are attached to the `Take screenshot` step that Allure records for each screenshot call. The screenshot is still returned to your test code unchanged.

This setting only affects screenshots captured automatically when `page.screenshot()`, `locator.screenshot()`, or `elementHandle.screenshot()` is called as a step. It does not affect `AllurePlaywright.attachScreenshot()`, which always attaches the screenshot it captures.

## allure.playwright.failure.screenshot

```properties
allure.playwright.failure.screenshot=true
```

Whether to capture a screenshot of each registered page and attach it to the test result when a test fails or is broken. Defaults to `true`.

Requires at least one page to be registered, either explicitly via `AllurePlaywright.register(page)` or automatically through Playwright's `newPage()` factory when AspectJ weaving is active.

## allure.playwright.failure.page-source

```properties
allure.playwright.failure.page-source=true
```

Whether to capture the current HTML of each registered page and attach it to the test result when a test fails or is broken. Defaults to `true`.

Subject to the same registration requirement as `allure.playwright.failure.screenshot`.

## allure.playwright.close.trace

```properties
allure.playwright.close.trace=true
```

Whether to stop and attach any open Playwright trace sessions when a `BrowserContext` or `Browser` is closed, or when the test ends. Defaults to `true`.

Applies to trace sessions started via `AllurePlaywright.startTracing()`. When disabled, open trace sessions are discarded without producing an attachment.

This setting does not affect trace attachment on test failure — open traces are always attached when a test fails, regardless of this value.

## allure.playwright.close.video

```properties
allure.playwright.close.video=true
```

Whether to attach Playwright-recorded video files when a `Page`, `BrowserContext`, or `Browser` is closed. Defaults to `true`.

Applies only to contexts created with `setRecordVideoDir()`. The video file is read after the close, when Playwright has finished writing it.

## allure.playwright.close.page-logs

```properties
allure.playwright.close.page-logs=true
```

Whether to capture console messages and page errors from registered pages and attach them to the test result. Defaults to `true`.

This fires when a `Page`, `BrowserContext`, or `Browser` is closed while a test is active, and also when the test ends normally (for any registered pages whose context was not explicitly closed). Two attachments are produced per page: one for console messages (`Console messages`) and one for uncaught JavaScript errors (`Page errors`). Empty attachments are not added.
