Class AttachmentGalleryPicker


  • public class AttachmentGalleryPicker
    extends BaseElement
    Page object for an attachment picker.
    Since:
    14.4RC1
    Version:
    $Id: bed3d34c0723ee0b6aaf438226238fde670e25f8 $
    • Constructor Detail

      • AttachmentGalleryPicker

        public AttachmentGalleryPicker​(String id)
        Default constructor.
        Parameters:
        id - the id of the attachment picker
    • Method Detail

      • waitUntilReady

        public AttachmentGalleryPicker waitUntilReady()
        Wait until the picker is ready.
        Returns:
        the current page object
      • getAttachmentTitles

        public List<String> getAttachmentTitles()
        Returns:
        the list of the titles of the attachments
      • setSearch

        public AttachmentGalleryPicker setSearch​(String searchQuery)
        Define the search query of the attachment picker.
        Parameters:
        searchQuery - the search query, for instance the name of an attachment
        Returns:
        the current page object
      • waitUntilAttachmentsCount

        public void waitUntilAttachmentsCount​(IntPredicate predicate)
        Wait until the expected number of attachments is displayed in the picker.
        Parameters:
        predicate - a boolean predicate taking the current attachments count in parameter
      • waitNoResultMessageDisplayed

        public void waitNoResultMessageDisplayed()
        Wait until the not result warning message is displayed.
      • toggleAllPages

        public AttachmentGalleryPicker toggleAllPages()
        Click on the "All Pages" search button to return search results from the whole farm.
        Returns:
        the current page object
        Since:
        14.10.1, 15.0RC1
      • toggleCurrentPage

        public AttachmentGalleryPicker toggleCurrentPage()
        Click on the "Current Page" search button to return search results from the current page only.
        Returns:
        the current page object
        Since:
        14.10.1, 15.0RC1
      • clickAttachment

        public AttachmentGalleryPicker clickAttachment​(String attachmentName)
        Click on an attachment. This will either select or un-select it according to it's initial state.
        Parameters:
        attachmentName - the name of the attachment to click on
        Returns:
        the current page object
        Since:
        14.10.1, 14.5RC1
      • getSelectedAttachment

        public Optional<String> getSelectedAttachment()
        Returns the name of the currently selected attachment, wrapped in an Optional, or Optional.empty() if no attachment is currently selected.
        Returns:
        the currently selected attachment name, wrapped in an Optional, or Optional.empty() if no attachment is currently selected
        Since:
        14.10.1, 14.5RC1
      • isGlobalSelectionWarningDisplayed

        public boolean isGlobalSelectionWarningDisplayed()
        Returns:
        true if the global selection warning message is displayed, false otherwise
        Since:
        14.10.1, 14.5RC1