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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterEvent(LogEvent event) voidbeforeEvent(LogEvent currentLog) @Nullable AssertionErrorcleanAndGetAssertionError(String testName, @Nullable Throwable testFailure, boolean fullStacktraces) 1.voidcleanAndThrowAssertionError(String testName, @Nullable Throwable testFailure, boolean fullStacktraces) copy()Make a copy of this collector.protected booleantoString()static voidvalidateAssertionMode(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:
afterEventin interfaceLogEventListener
-
beforeEvent
- Specified by:
beforeEventin 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
-