Class DocumentPicker


  • public class DocumentPicker
    extends BaseElement
    Represents the Document Picker.
    Since:
    7.2M3
    Version:
    $Id: baca02165ad08dcd1d9b8ea6c8374f681d8b757f $
    • Field Detail

      • container

        protected org.openqa.selenium.WebElement container
    • Constructor Detail

      • DocumentPicker

        public DocumentPicker()
        Use this constructor only if there is only one document picker on the page.
      • DocumentPicker

        public DocumentPicker​(org.openqa.selenium.WebElement container)
    • Method Detail

      • getTitle

        public String getTitle()
      • waitForName

        public DocumentPicker waitForName​(String name)
        Wait until the name field has been changed.
        Parameters:
        name - the new name
        Returns:
        this.
      • getTitleInput

        public org.openqa.selenium.WebElement getTitleInput()
      • toggleLocationAdvancedEdit

        public DocumentPicker toggleLocationAdvancedEdit()
      • getParent

        public String getParent()
      • getParentInput

        public org.openqa.selenium.WebElement getParentInput()
      • getName

        public String getName()
      • getNameInput

        public org.openqa.selenium.WebElement getNameInput()
      • browseDocuments

        public void browseDocuments()
        Clicks the "pick document" button that triggers a modal pop-up to be displayed.

        The caller is responsible for handling the modal (or instantiating the right page object element), such we limit the extra coupling that would be required from the test framework if it were to instantiate and return the page object for the modal pop-up.

      • waitForLocation

        public void waitForLocation​(String expectedPathString)
        Wait for the Breadcrumb to display the passed path string and throw an exception if the timeout is reached. Note that we need to wait since the Breadcrumb is updated live and asserting its content without waiting would lead to false positives.

        Note: This method can not be implemented inside BreadcrumbElement because a change of parent replaces completely the BreadcrumbElement's container and thus it becomes stale. To avoid that, at each wait iteration, we lookup the current breadcrumb element and not a cached one.

        Parameters:
        expectedPathString - the path string to wait for
        Since:
        7.2RC1
      • waitForLocation

        public void waitForLocation​(List<String> expectedPath)
        Wait for the Breadcrumb to display the passed path and throw an exception if the timeout is reached. Note that we need to wait since the Breadcrumb is updated live and asserting its content without waiting would lead to false positives.

        Note: This method can not be implemented inside BreadcrumbElement because a change of parent replaces completely the BreadcrumbElement's container and thus it becomes stale. To avoid that, at each wait iteration, we lookup the current breadcrumb element and not a cached one.

        Parameters:
        expectedPath - the path to wait for
        Since:
        7.2RC1