Package com.codeborne.selenide.logevents
Class ErrorsCollector
java.lang.Object
com.codeborne.selenide.logevents.ErrorsCollector
- All Implemented Interfaces:
LogEventListener
- Direct Known Subclasses:
SoftAssertsErrorsCollector
@ParametersAreNonnullByDefault
public class ErrorsCollector
extends Object
implements LogEventListener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEvent
(LogEvent event) void
beforeEvent
(LogEvent currentLog) cleanAndGetAssertionError
(String testName, Throwable testFailure, boolean fullStacktraces) 1.void
cleanAndThrowAssertionError
(String testName, Throwable testFailure, boolean fullStacktraces) copy()
Make a copy of this collector.protected boolean
toString()
static void
validateAssertionMode
(Config config)
-
Field Details
-
LISTENER_SOFT_ASSERT
- See Also:
-
-
Constructor Details
-
ErrorsCollector
public ErrorsCollector()
-
-
Method Details
-
copy
Make a copy of this collector. Used to take over errors collected in "before all" to each test.- Returns:
- A new collector that contains all errors collected by this collector
-
isEnabled
protected boolean isEnabled() -
afterEvent
- Specified by:
afterEvent
in interfaceLogEventListener
-
beforeEvent
- Specified by:
beforeEvent
in interfaceLogEventListener
-
cleanAndGetAssertionError
@Nullable public AssertionError cleanAndGetAssertionError(String testName, @Nullable Throwable testFailure, boolean fullStacktraces) 1. Clears all collected errors, and 2. returns SoftAssertionError if there were some errors- Parameters:
testName
- any string, usually name of current test
-
cleanAndThrowAssertionError
-
validateAssertionMode
-
toString
-