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 process
    java.util.List<java.lang.String> getValue()
    This method returns the name of attached files
    void removeAttachment​(java.lang.Integer... index)
    This method is used to delete the specific file using its Index Index starts from 0
    void reset()
    This method can be used to reset the chosen file

    Methods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent

    getEl, getFieldErrorMessage, getTooltipMessage, isDisplayed, setMultipleValues, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • NeoAttachmentsField

      public NeoAttachmentsField​(NeoUIContext context, org.openqa.selenium.WebElement element)
      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