Package 

Class FailureLoggingProviderImpl

    • Method Summary

      Modifier and Type Method Description
      <T extends Any> T withLoggingOnFailure(Function0<T> action) Invokes the given action and logs if it fails.
      Unit logStackTrace(Throwable error) Logs the error's stacktrace.
      Unit logDescriptionAndThrow(Throwable error, Matcher<View> viewMatcher) Logs the error description got by viewMatcher and throws the error.
      • Methods inherited from class com.kaspersky.kaspresso.failure.FailureLoggingProvider

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FailureLoggingProviderImpl

        FailureLoggingProviderImpl(UiTestLogger logger)
    • Method Detail

      • withLoggingOnFailure

         <T extends Any> T withLoggingOnFailure(Function0<T> action)

        Invokes the given action and logs if it fails.

        Parameters:
        action - the action to invoke.
      • logStackTrace

         Unit logStackTrace(Throwable error)

        Logs the error's stacktrace.

        Parameters:
        error - the error to get stacktrace from.
      • logDescriptionAndThrow

         Unit logDescriptionAndThrow(Throwable error, Matcher<View> viewMatcher)

        Logs the error description got by viewMatcher and throws the error.

        Parameters:
        error - the error to be described.
        viewMatcher - the view matcher to get description from.