Class FileUpload
java.lang.Object
org.primefaces.selenium.AbstractPrimePageFragment
org.primefaces.selenium.component.base.AbstractComponent
org.primefaces.selenium.component.base.AbstractInputComponent
org.primefaces.selenium.component.FileUpload
- All Implemented Interfaces:
org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
Component wrapper for the PrimeFaces
p:fileUpload.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebElementGets the Cancel button of the widget.org.openqa.selenium.WebElementgetAdvancedCancelButton(String fileName) Gets the file Cancel button of the widget.org.openqa.selenium.WebElementGets the Upload button of the widget.Gets the displayed filename.org.openqa.selenium.WebElementgetInput()The input element reference.getValue()Returns the input´s value.Gets the values displayed by the widget.Gets the values displayed by the widget.booleanbooleanvoidSets the input's value from given files.voidSets the input's value from given files.voidsetValue(Serializable value) Sets the input's value.voidsetValue(Serializable value, boolean useGuard) Sets the input's value.Methods inherited from class org.primefaces.selenium.component.base.AbstractInputComponent
clear, copyToClipboard, disable, enable, focus, getAssignedLabel, getAssignedLabelText, isEnabled, isOnchangeAjaxified, pasteFromClipboard, selectAllTextMethods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxifiedMethods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.TakesScreenshot
getScreenshotAsMethods inherited from interface org.openqa.selenium.WebElement
click, findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isSelected, sendKeys, submit
-
Constructor Details
-
FileUpload
public FileUpload()
-
-
Method Details
-
getInput
public org.openqa.selenium.WebElement getInput()Description copied from class:AbstractInputComponentThe input element reference.- Overrides:
getInputin classAbstractInputComponent- Returns:
- the
WebElementrepresenting the input.
-
getValue
Returns the input´s value.- Returns:
- the file name
-
setValue
Sets the input's value. This should be the files absolute path.- Parameters:
value- the file name to set
-
setValue
Sets the input's value. This should be the files absolute path.- Parameters:
value- the file name touseGuard- use guard to wait until the upload finished
-
setValue
Sets the input's value from given files.- Parameters:
values- the file name(s) to set
-
setValue
Sets the input's value from given files.- Parameters:
values- the file name(s) to setuseGuard- 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
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
Gets the displayed filename.- Returns:
- the widget's value
-
getWidgetValues
Gets the values displayed by the widget.- Returns:
- the widget's values
-
getWidgetErrorMessages
Gets the values displayed by the widget.- Returns:
- the widget's error messages
-
isAdvancedMode
public boolean isAdvancedMode() -
isAutoUpload
public boolean isAutoUpload()
-