Allure Selenium BiDi configuration
This page describes the configuration options that affect the behavior of Allure Selenium BiDi.
All options are set via the fluent API on AllureWebDriverBiDi before decorating the driver:
AllureWebDriverBiDi bidi = new AllureWebDriverBiDi()
.logs(true)
.network(true)
.maxLogEntries(500)
.maxNetworkEvents(1000)
.redactHeaders("X-My-Secret");
WebDriver driver = bidi.decorate(new ChromeDriver(options));logs
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.
new AllureWebDriverBiDi().logs(false)network
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.
new AllureWebDriverBiDi().network(false)maxLogEntries
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.
new AllureWebDriverBiDi().maxLogEntries(200)maxNetworkEvents
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.
new AllureWebDriverBiDi().maxNetworkEvents(500)Redacting headers
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.
new AllureWebDriverBiDi()
.redactHeaders("X-Auth-Token", "X-Internal-Secret")