Package com.codeborne.selenide.logevents
Class ErrorsCollector
java.lang.Object
com.codeborne.selenide.logevents.ErrorsCollector
- All Implemented Interfaces:
LogEventListener
- Direct Known Subclasses:
SoftAssertsErrorsCollector
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEvent
(LogEvent event) void
beforeEvent
(LogEvent currentLog) @Nullable AssertionError
cleanAndGetAssertionError
(String testName, @Nullable Throwable testFailure, boolean fullStacktraces) 1.void
cleanAndThrowAssertionError
(String testName, @Nullable 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
public @Nullable 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
-