Class NeoAttachmentsField
java.lang.Object
com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
com.onenetwork.platform.tools.test.ui.neo.components.NeoAttachmentsField
public class NeoAttachmentsField extends NeoComponent
This class represents the Attachments field component of react which can be used to upload files
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebElement
addFileButton
static java.lang.String
COMPONENT_NAME
protected org.openqa.selenium.WebElement
removeFileButton
Fields inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
context, driver, element
-
Constructor Summary
Constructors Constructor Description NeoAttachmentsField(NeoUIContext context, org.openqa.selenium.WebElement element)
Initializes the reset and upload button element of the attachment field -
Method Summary
Modifier and Type Method Description void
addFile(java.lang.String filePath)
This method facilitates the file upload process using the auto-it processjava.util.List<java.lang.String>
getValue()
This method returns the name of attached filesvoid
removeAttachment(java.lang.Integer... index)
This method is used to delete the specific file using its Index Index starts from 0void
reset()
This method can be used to reset the chosen fileMethods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
getEl, getFieldErrorMessage, getTooltipMessage, isDisplayed, setMultipleValues, setValue
-
Field Details
-
COMPONENT_NAME
public static final java.lang.String COMPONENT_NAME- See Also:
- Constant Field Values
-
addFileButton
protected org.openqa.selenium.WebElement addFileButton -
removeFileButton
protected org.openqa.selenium.WebElement removeFileButton
-
-
Constructor Details
-
NeoAttachmentsField
Initializes the reset and upload button element of the attachment field- Parameters:
context
-element
-
-
-
Method Details
-
addFile
public void addFile(java.lang.String filePath)This method facilitates the file upload process using the auto-it process- Parameters:
filePath
-
-
reset
public void reset()This method can be used to reset the chosen file -
removeAttachment
public void removeAttachment(java.lang.Integer... index)This method is used to delete the specific file using its Index Index starts from 0- Parameters:
index
-
-
getValue
public java.util.List<java.lang.String> getValue()This method returns the name of attached files- Returns:
- List
-