Class NeoAddressTriggerField

java.lang.Object
com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
com.onenetwork.platform.tools.test.ui.neo.components.NeoAddressTriggerField

public class NeoAddressTriggerField
extends NeoComponent
This class represents the NeoAddressTrigger Field of the React UI
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String COMPONENT_NAME  
    protected org.openqa.selenium.WebElement popUpButton  

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

    context, driver, element
  • Constructor Summary

    Constructors 
    Constructor Description
    NeoAddressTriggerField​(NeoUIContext context, org.openqa.selenium.WebElement element)
    Initializes the context, element and popUpButton of the address field
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getLabel()  
    org.json.JSONObject getValue()
    This method returns the JSONObject containing the different address components Return JSONObject like
    boolean isDisabled()  
    void openAddressPopup()  
    void setAddress​(org.json.JSONObject address)  
    void setAddressUsingControls​(org.json.JSONObject address)
    This method sets the address of supplied in the parameter JSONObject Returns jsonObject as below:
    void setLabel​(java.lang.String label)  

    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

    • NeoAddressTriggerField

      public NeoAddressTriggerField​(NeoUIContext context, org.openqa.selenium.WebElement element)
      Initializes the context, element and popUpButton of the address field
      Parameters:
      context -
      element -
  • Method Details

    • openAddressPopup

      public void openAddressPopup()
    • isDisabled

      public boolean isDisabled()
    • getLabel

      public java.lang.String getLabel()
      Returns:
      the label
    • setLabel

      public void setLabel​(java.lang.String label)
      Parameters:
      label - the label to set
    • getValue

      public org.json.JSONObject getValue()
      This method returns the JSONObject containing the different address components Return JSONObject like
            {
              "ZIP":"48795" or "POSTAL_CODE":"48795",
              "STREET1":"Line1 Value",
              "STREET2":"Line2 Value",
              "STREET3":"Line3 Value",
              "STATE:"AA",
              "COUNTRY":"US",
              "CITY":"City Name"
            }
       
      Returns:
      JSONObject
    • setAddressUsingControls

      public void setAddressUsingControls​(org.json.JSONObject address)
      This method sets the address of supplied in the parameter JSONObject Returns jsonObject as below:
            {
              "ZIP":"48795" or "POSTAL_CODE":"48795",
              "STREET1":"Line1 Value",
              "STREET2":"Line2 Value",
              "STREET3":"Line3 Value",
              "STATE":"AA",
              "COUNTRY":"US",
              "CITY":"City Name"
            }
       
      Parameters:
      address -
    • setAddress

      public void setAddress​(org.json.JSONObject address)