---
title: Selenium BiDi configuration
description: Configuration options for Allure Selenium BiDi | Enable or disable log and network capture | Set per-test entry limits | Redact sensitive headers
---

# Allure Selenium BiDi configuration

This page describes the configuration options that affect the behavior of [Allure Selenium BiDi](/docs/selenium-bidi/).

All options are set via the fluent API on `AllureWebDriverBiDi` before decorating the driver:

```java
AllureWebDriverBiDi bidi = new AllureWebDriverBiDi()
        .logs(true)
        .network(true)
        .maxLogEntries(500)
        .maxNetworkEvents(1000)
        .redactHeaders("X-My-Secret");

WebDriver driver = bidi.decorate(new ChromeDriver(options));
```

## logs

```java
new AllureWebDriverBiDi().logs(boolean)
```

Whether to capture browser log events and produce a "WebDriver BiDi logs" attachment. Defaults to `true`.

Log events include browser console output (`console.log`, `console.warn`, `console.error`, etc.), uncaught JavaScript exceptions, and other generic browser log entries.

```java
new AllureWebDriverBiDi().logs(false)
```

## network

```java
new AllureWebDriverBiDi().network(boolean)
```

Whether to capture network events and produce a "WebDriver BiDi network" attachment. Defaults to `true`.

Network events include `beforeRequestSent`, `responseStarted`, `responseCompleted`, and `fetchError`.

```java
new AllureWebDriverBiDi().network(false)
```

## maxLogEntries

```java
new AllureWebDriverBiDi().maxLogEntries(int)
```

Maximum number of log entries to retain per test. Defaults to `1000`.

When the limit is reached, additional entries are discarded. The `dropped` field in the attachment reports how many entries were dropped. Must be greater than or equal to `0`.

```java
new AllureWebDriverBiDi().maxLogEntries(200)
```

## maxNetworkEvents

```java
new AllureWebDriverBiDi().maxNetworkEvents(int)
```

Maximum number of network events to retain per test. Defaults to `2000`.

When the limit is reached, additional events are discarded. The `dropped` field in the attachment reports how many events were dropped. Must be greater than or equal to `0`.

```java
new AllureWebDriverBiDi().maxNetworkEvents(500)
```

## Redacting headers

```java
new AllureWebDriverBiDi().redactHeaders(String...)
```

Adds header names to the redaction list. Redacted header values are replaced with `[REDACTED]` in the "WebDriver BiDi network" attachment. Redaction applies to both request and response headers. Header name matching is case-insensitive.

The following headers are redacted by default:

| Header                |
| --------------------- |
| `authorization`       |
| `proxy-authorization` |
| `cookie`              |
| `set-cookie`          |
| `x-api-key`           |

Calling `redactHeaders()` adds names to the default list. Each call replaces the previous call's additions, so pass all custom header names in a single call.

```java
new AllureWebDriverBiDi()
        .redactHeaders("X-Auth-Token", "X-Internal-Secret")
```
