public class FileWidgetElement extends AbstractWidgetElement
Modifier and Type | Class and Description |
---|---|
static class |
FileWidgetElement.InputFileChoice |
driver, id
Constructor and Description |
---|
FileWidgetElement(org.openqa.selenium.WebDriver driver,
String id) |
Modifier and Type | Method and Description |
---|---|
String |
getEditChoice() |
String |
getFilename(boolean isEdit) |
boolean |
hasChoice(FileWidgetElement.InputFileChoice choice)
Returns true if given option is presented on file widget radio options.
|
void |
keepFile()
Selects available option that should result in keeping selected file.
|
void |
removeFile()
Selects available option that should result in no file being present on the document.
|
void |
selectChoice(FileWidgetElement.InputFileChoice choice)
Select given choice on file widget radio options.
|
void |
uploadFile(String filePath)
Uploads file with given path.
|
void |
uploadTestFile(String prefix,
String suffix,
String content) |
getMessageValue, getMessageValue, getWidgetId
getElement, getElement, getId, getSubElement, getSubElement, getSubElementId, getWebFragment, getWidget, getWidget, hasSubElement, instantiateWidget, setId, setInput, setInput, setInput
public FileWidgetElement(org.openqa.selenium.WebDriver driver, String id)
public String getEditChoice()
public String getFilename(boolean isEdit)
public void uploadTestFile(String prefix, String suffix, String content) throws IOException
IOException
public void uploadFile(String filePath) throws IOException
IOException
public void removeFile()
public void keepFile()
public boolean hasChoice(FileWidgetElement.InputFileChoice choice)
public void selectChoice(FileWidgetElement.InputFileChoice choice)
org.openqa.selenium.NoSuchElementException
- if option is not available.Copyright © 2019 Nuxeo. All rights reserved.