Class BasePage<T>

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public abstract class BasePage<T>
    extends Base
    Base class for page objects.
    • Constructor Detail

      • BasePage

        public BasePage()
    • Method Detail

      • hasImage

        public boolean hasImage​(String imageName)
        Parameters:
        imageName - image to check for
        Returns:
        true, if the image has been found on the current screen
      • hasImage

        public boolean hasImage​(String imageName,
                                double threshold)
        Checks for the given image within the current screen.
        Parameters:
        imageName - image to check for
        threshold - matching threshold
        Returns:
        true, if the image has been found on the current screen
      • findImage

        public Match findImage​(String imageName,
                               double threshold)
        Finds the given image within the current screen.
        Parameters:
        imageName - image to check for
        threshold - matching threshold
        Returns:
        Match
      • initializeLocatorMap

        @PostConstruct
        public void initializeLocatorMap()
        Initialize the LocatorMap.
      • verify

        public T verify()
        Returns:
        this page object
      • verify

        public T verify​(int timeout)
        Verifies, that all UI elements defined for the given page object using ScreenIdentifier are displayed.

        Performs Galen and Applitools checks, if enabled.

        Parameters:
        timeout - the timeout for identifying the first element. Note, that there is no timeout for any subsequent checks!
        Returns:
        this page object