Class FileUpload

  • All Implemented Interfaces:
    org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

    public abstract class FileUpload
    extends AbstractInputComponent
    Component wrapper for the PrimeFaces p:fileUpload.
    • Constructor Detail

      • FileUpload

        public FileUpload()
    • Method Detail

      • getValue

        public String getValue()
        Returns the input´s value.
        Returns:
        the file name
      • setValue

        public void setValue​(Serializable value)
        Sets the input's value. This should be the files absolute path.
        Parameters:
        value - the file name to set
      • setValue

        public void setValue​(File... values)
        Sets the input's value from given files.
        Parameters:
        values - the file name(s) to set
      • getAdvancedUploadButton

        public org.openqa.selenium.WebElement getAdvancedUploadButton()
        Gets the Upload button of the widget. The button is only rendered in advanced mode.
        Returns:
        the widget's upload button
      • getAdvancedCancelButton

        public org.openqa.selenium.WebElement getAdvancedCancelButton()
        Gets the Cancel button of the widget. The button is only rendered in advanced mode.
        Returns:
        the widget's cancel button
      • getAdvancedCancelButton

        public org.openqa.selenium.WebElement getAdvancedCancelButton​(String fileName)
        Gets the file Cancel button of the widget. The button is only rendered in advanced mode.
        Parameters:
        fileName - the file name for which to return the cancel button
        Returns:
        the widget's cancel button
      • getWidgetValue

        public String getWidgetValue()
        Gets the value displayed by the widget.
        Returns:
        the widget's value
      • getWidgetValues

        public List<String> getWidgetValues()
        Gets the values displayed by the widget.
        Returns:
        the widget's values
      • getWidgetErrorMessages

        public List<String> getWidgetErrorMessages()
        Gets the values displayed by the widget.
        Returns:
        the widget's error messages
      • isAdvancedMode

        public boolean isAdvancedMode()
      • isAutoUpload

        public boolean isAutoUpload()