А
должно быть напишу сам \ не буду писать сам
причины почему не буду - вторичны
Size: a a a
А
АБ
АБ
KV
LY
АБ
LY
V
KV
V
ES
V
V
V
V
A
@Rule, переделала в такое
public TestWatcher screenshotOnFailure = new TestWatcher() {
@Override
protected void failed(Throwable e, Description description) {
makeScreenshotOnFailure();
}
@Attachment("Screenshot on failure")
public byte[] makeScreenshotOnFailure() {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}
};
public TestWatcher screenshotOnFailure = new TestWatcher() {, теперь хз как подключить к тестовому методу с помощью
@Override
public void testDisabled(ExtensionContext extensionContext, Optional<String> optional) {}
@Override
public void testSuccessful(ExtensionContext extensionContext) {}
@Override
public void testAborted(ExtensionContext extensionContext, Throwable throwable) {}
@Override
public void testFailed(ExtensionContext extensionContext, Throwable throwable) {
makeScreenshotOnFailure();
}
@Attachment("Screenshot on failure")
public void makeScreenshotOnFailure() {
SelenideLogger.addListener("AllureSelenide",
new AllureSelenide()
.screenshots(true));
}
};
@ExtendWith
D
@Rule, переделала в такое
public TestWatcher screenshotOnFailure = new TestWatcher() {
@Override
protected void failed(Throwable e, Description description) {
makeScreenshotOnFailure();
}
@Attachment("Screenshot on failure")
public byte[] makeScreenshotOnFailure() {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}
};
public TestWatcher screenshotOnFailure = new TestWatcher() {, теперь хз как подключить к тестовому методу с помощью
@Override
public void testDisabled(ExtensionContext extensionContext, Optional<String> optional) {}
@Override
public void testSuccessful(ExtensionContext extensionContext) {}
@Override
public void testAborted(ExtensionContext extensionContext, Throwable throwable) {}
@Override
public void testFailed(ExtensionContext extensionContext, Throwable throwable) {
makeScreenshotOnFailure();
}
@Attachment("Screenshot on failure")
public void makeScreenshotOnFailure() {
SelenideLogger.addListener("AllureSelenide",
new AllureSelenide()
.screenshots(true));
}
};
@ExtendWith
A
A