Package com.vaadin.flow.component.upload
Class UploadLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<Upload,UploadLocator>
com.vaadin.flow.component.upload.UploadLocator
- All Implemented Interfaces:
Clickable<Upload>,HasThemeFilter<Upload,UploadLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class UploadLocator
extends Locator<Upload,UploadLocator>
implements Clickable<Upload>, HasThemeFilter<Upload,UploadLocator>
Generated locator for
Upload, derived from
UploadTester. Filter steps are inherited from
Locator; action methods delegate to a fresh tester
around the resolved component, so behavioral changes belong on the
tester, not here.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures the component is in a usable state before interaction.Gets the component being tested.voidSend the file data to the Upload component as if it is uploaded in the browser.voidSend the file data to the Upload component as if it is uploaded in the browser.voidupload(String fileName, String contentType, InputStream contents) Send the file data to the Upload component as if it is uploaded in the browser.voiduploadAborted(File file) Simulates upload interruption by user on browser.voiduploadAborted(String fileName, String contentType) Simulates upload interruption by user on browser.voidSimulates uploading multiple files at once.voiduploadAll(Collection<File> files) Simulates uploading multiple files at once.voiduploadFailed(File file) Simulates a failure during file upload.voiduploadFailed(String fileName, String contentType) Simulates a failure during file upload.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, withId, withoutAttribute, withoutAttribute, withoutClassNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasThemeFilter
withoutTheme, withTheme
-
Constructor Details
-
UploadLocator
public UploadLocator() -
UploadLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Upload>- Returns:
- the component under test
-
ensureComponentIsUsable
public void ensureComponentIsUsable()Description copied from interface:ClickableEnsures the component is in a usable state before interaction.- Specified by:
ensureComponentIsUsablein interfaceClickable<Upload>
-
upload
Send the file data to the Upload component as if it is uploaded in the browser. Javadoc copied fromUploadTester.upload(java.lang.String,java.lang.String,java.io.InputStream).- Parameters:
fileName- name of the file to uploadcontentType- content type of the file to uploadcontents- file contents as an array of bytes
-
upload
Send the file data to the Upload component as if it is uploaded in the browser. Javadoc copied fromUploadTester.upload(java.lang.String,java.lang.String,byte[]).- Parameters:
fileName- name of the file to uploadcontentType- content type of the file to uploadcontents- file contents as an array of bytes
-
upload
Send the file data to the Upload component as if it is uploaded in the browser. The content type is detected from file name. Javadoc copied fromUploadTester.upload(java.io.File).- Parameters:
file- the file to upload
-
uploadAll
Simulates uploading multiple files at once. Javadoc copied fromUploadTester.uploadAll(java.io.File[]).- Parameters:
files- files to upload
-
uploadAll
Simulates uploading multiple files at once. Javadoc copied fromUploadTester.uploadAll(java.util.Collection).- Parameters:
files- files to upload
-
uploadAborted
Simulates upload interruption by user on browser. Javadoc copied fromUploadTester.uploadAborted(java.lang.String,java.lang.String).- Parameters:
fileName- name of uploading filecontentType- content type of the uploading file
-
uploadAborted
Simulates upload interruption by user on browser. Javadoc copied fromUploadTester.uploadAborted(java.io.File).- Parameters:
file- uploading file
-
uploadFailed
Simulates a failure during file upload. Javadoc copied fromUploadTester.uploadFailed(java.io.File).- Parameters:
file- uploading file
-
uploadFailed
Simulates a failure during file upload. Javadoc copied fromUploadTester.uploadFailed(java.lang.String,java.lang.String).- Parameters:
fileName- name of uploading filecontentType- content type of the uploading file
-