@@ -77,7 +77,69 @@ SelenideLogger.addListener("AllureSelenide", new AllureSelenide().enableLogs(Log
7777https://github.com/SeleniumHQ/selenium/wiki/Logging
7878```
7979
80-
80+ ## Playwright Java
81+
82+ AspectJ-based integration for Playwright Java that reports browser actions as Allure steps and attaches
83+ Playwright screenshots automatically:
84+
85+ ``` xml
86+ <dependency >
87+ <groupId >io.qameta.allure</groupId >
88+ <artifactId >allure-playwright</artifactId >
89+ <version >$LATEST_VERSION</version >
90+ </dependency >
91+ ```
92+
93+ Enable the AspectJ weaver for automatic action steps:
94+ ```
95+ -javaagent:/path/to/aspectjweaver.jar
96+ ```
97+
98+ Usage example with Playwright Java JUnit fixtures:
99+ ``` java
100+ @UsePlaywright
101+ class UiTest {
102+
103+ @Test
104+ void shouldOpenPage (Page page ) {
105+ page. navigate(" https://playwright.dev" );
106+ page. screenshot();
107+ }
108+ }
109+ ```
110+
111+ The module registers an Allure test lifecycle listener automatically, so per-test cleanup, failure diagnostics,
112+ and final trace/log flush work with any test framework that reports through Allure. Playwright pages and
113+ contexts are tracked by the AspectJ integration when they are created or used. Use
114+ ` AllurePlaywright.register(...) ` only for pages or contexts the aspect cannot observe.
115+
116+ Frameworks or custom runners that do not use the Allure lifecycle can call the reporting hooks directly:
117+ ``` java
118+ AllurePlaywright . beforeTest();
119+ try {
120+ testBody();
121+ } catch (Throwable e) {
122+ AllurePlaywright . afterTestFailure(e);
123+ throw e;
124+ } finally {
125+ AllurePlaywright . afterTest();
126+ }
127+ ```
128+
129+ The following defaults can be overridden in ` allure.properties ` :
130+ ```
131+ allure.playwright.steps.enabled=true
132+ allure.playwright.steps.mode=actions
133+ allure.playwright.parameters=redacted
134+ allure.playwright.screenshots.attach=true
135+ allure.playwright.failure.screenshot=true
136+ allure.playwright.failure.page-source=true
137+ allure.playwright.close.trace=true
138+ allure.playwright.close.video=true
139+ allure.playwright.close.page-logs=true
140+ ```
141+
142+
81143## Rest Assured
82144
83145Filter for rest-assured http client, that generates attachment for allure.
0 commit comments