Package 

Object Screen.Companion

    • Method Summary

      Modifier and Type Method Description
      final Unit idle(Long duration) Idles for given amount of time
      final <T extends Screen<T>> T onScreen(Function1<T, Unit> function) Initializes instance of the screen class provided and invokes given tail lambda on it.
      • Methods inherited from class java.lang.Object

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

      • idle

         final Unit idle(Long duration)

        Idles for given amount of time

        Parameters:
        duration - Time to idle in milliseconds (1 second by default)
      • onScreen

         final <T extends Screen<T>> T onScreen(Function1<T, Unit> function)

        Initializes instance of the screen class provided and invokes given tail lambda on it.

        This approach helps to reduce boilerplate code and avoid have a screen instance stored in a properties of you tests classes.

        In order to use this function, your Screen class must have an empty primary constructor.

        Parameters:
        function - Tail lambda to be invoked on the created instance of screen.