Allure Selenide configuration
This page describes the configuration options that affect the behavior of Allure Selenide.
All options are set via the fluent API on AllureSelenide when registering the listener:
SelenideLogger.addListener("allure", new AllureSelenide()
.screenshots(true)
.savePageSource(true)
.includeSelenideSteps(true)
.enableLogs(LogType.BROWSER, Level.SEVERE));screenshots
new AllureSelenide().screenshots(boolean)Whether to capture a screenshot and attach it to the failing step when a Selenide step fails. Defaults to true.
The screenshot is captured from the currently active WebDriver session. If no browser is open at the point of failure, no screenshot is taken and no attachment is added.
SelenideLogger.addListener("allure", new AllureSelenide()
.screenshots(false));savePageSource
new AllureSelenide().savePageSource(boolean)Whether to capture the current page HTML and attach it to the failing step when a Selenide step fails. Defaults to true.
The page source is captured from the currently active WebDriver session as a text/html attachment. If no browser is open at the point of failure, no attachment is added.
SelenideLogger.addListener("allure", new AllureSelenide()
.savePageSource(false));includeSelenideSteps
new AllureSelenide().includeSelenideSteps(boolean)Whether to record Selenide's built-in element interaction events as Allure steps. Defaults to true.
When set to false, events that are SelenideLog instances (Selenide's built-in element interaction events) are not recorded as steps. Events of other types — for example, from custom LogEventListener implementations — are still recorded regardless of this setting.
When set to false, screenshots, page source, and browser logs are still captured when a Selenide step fails. They are attached to the enclosing Allure step or test rather than to a dedicated Selenide step.
Use false when you want a cleaner report that shows only your high-level Allure.step() calls rather than every low-level Selenide action.
SelenideLogger.addListener("allure", new AllureSelenide()
.includeSelenideSteps(false));enableLogs
new AllureSelenide().enableLogs(LogType logType, Level logLevel)Enable capture of a Selenium WebDriver browser log type at the given level. When a Selenide step fails, logs of this type are retrieved and attached to the failing step. No log types are enabled by default.
The attachment is named Logs from: <type> (for example, Logs from: browser).
Multiple log types can be enabled by chaining calls:
SelenideLogger.addListener("allure", new AllureSelenide()
.enableLogs(LogType.BROWSER, Level.ALL)
.enableLogs(LogType.PERFORMANCE, Level.ALL));Available LogType values: BROWSER, CLIENT, DRIVER, PERFORMANCE, PROFILER, SERVER. Browser support varies — not all browsers expose all log types via WebDriver.
disableLogs
new AllureSelenide().disableLogs(LogType logType)Remove a previously enabled log type from capture. Has no effect if the log type was not enabled.