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 Details

    • FileUpload

      public FileUpload()
  • Method Details

    • getInput

      public org.openqa.selenium.WebElement getInput()
      Description copied from class: AbstractInputComponent
      The input element reference.
      Overrides:
      getInput in class AbstractInputComponent
      Returns:
      the WebElement representing the input.
    • 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(Serializable value, boolean useGuard)
      Sets the input's value. This should be the files absolute path.
      Parameters:
      value - the file name to
      useGuard - use guard to wait until the upload finished
    • setValue

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

      public void setValue(boolean useGuard, File... values)
      Sets the input's value from given files.
      Parameters:
      values - the file name(s) to set
      useGuard - use guard to wait until the upload finished
    • 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
    • getFilename

      public String getFilename()
      Gets the displayed filename.
      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()