Class ObjectEditPane


  • public class ObjectEditPane
    extends FormContainerElement
    Represents a group of form fields that are used to edit an object of a specific type.
    Since:
    5.1RC1
    Version:
    $Id: 35275b61f64959345055e5734efd853f23a53f4f $
    • Constructor Detail

      • ObjectEditPane

        public ObjectEditPane​(org.openqa.selenium.By containerLocator,
                              String className,
                              int objectNumber)
        Creates a new edit pane for an object of the specified type. The form fields from the given container should correspond to properties of the specified type.
        Parameters:
        containerLocator - the element that locates the form fields used to edit the object
        className - the object type
        objectNumber - the object number (identifies the object in the set of objects of the same type)
      • ObjectEditPane

        public ObjectEditPane​(org.openqa.selenium.WebElement container,
                              String className,
                              int objectNumber)
        Creates a new edit pane for an object of the specified type. The form fields from the given container should correspond to properties of the specified type.
        Parameters:
        container - the element that wraps the form fields used to edit the object
        className - the object type
        objectNumber - the object number (identifies the object in the set of objects of the same type)
    • Method Detail

      • isObjectDisplayed

        @Unstable
        public boolean isObjectDisplayed()
        Checks if the information are loaded and displayed.
        Returns:
        true if the object information are displayed (i.e. the object is expanded)
        Since:
        13.1RC1
      • displayObject

        @Unstable
        public void displayObject()
        Click on the xobject div to expand it, and waits until the information are loaded and displayed. This method checks if the information are already displayed to avoid collapsing them if it's already the case.
        Since:
        13.1RC1
      • openDatePicker

        public BootstrapDateTimePicker openDatePicker​(String datePropertyName)
        Opens the date picker for the specified date property of the edited object.
        Parameters:
        datePropertyName - the name of a date property of the edited object
        Returns:
        the date picker
      • getSuggestInput

        public SuggestInputElement getSuggestInput​(String userPropertyName)
        Parameters:
        userPropertyName - the name of a property
        Returns:
        a suggest input for the given property
      • byPropertyName

        public org.openqa.selenium.By byPropertyName​(String propertyName)
        Creates a locator for the input fields corresponding to the given object property.
        Parameters:
        propertyName - the name of an object property
        Returns:
        the locator for the input field corresponding to the specified property
      • setPropertyValue

        public ObjectEditPane setPropertyValue​(String propertyName,
                                               String propertyValue)
        Helper to fill property values quickly.
        Parameters:
        propertyName - the name of the property to set
        propertyValue - the value of the property
        Returns:
        the current instance.
      • isDeleteLinkDisplayed

        public boolean isDeleteLinkDisplayed()
        Returns:
        true if the delete link is displayed for this object.
        Since:
        12.4RC1
      • isEditLinkDisplayed

        public boolean isEditLinkDisplayed()
        Returns:
        true if the edit link is displayed for this object.
        Since:
        12.4RC1
      • getObjectNumber

        public int getObjectNumber()
        Returns:
        the current object number.
        Since:
        12.4RC1