Class FormContainerElement

  • Direct Known Subclasses:
    ObjectEditPane

    public class FormContainerElement
    extends BaseElement
    Represents a form element and provide utility methods to get/set form data. This container element can be a FORM element. It can also be some DIV element wrapping several FORM elements.
    Since:
    3.2M3
    Version:
    $Id: 87d53bffc7713204092369034ffb0fa0b4c13680 $
    • Constructor Detail

      • FormContainerElement

        public FormContainerElement​(org.openqa.selenium.By formSelector)
        The form element is retrieved through the given selector. This allow to retrieve a specific form when the container contains multiples.
        Parameters:
        formSelector - the selector used to retrieve the form
        Since:
        11.5RC1, 11.3.1
      • FormContainerElement

        public FormContainerElement​(org.openqa.selenium.WebElement formContainer)
        The form element is retrieved through its container. Note that this constructor shouldn't be used in case of several forms.
        Parameters:
        formContainer - the container containing the form.
    • Method Detail

      • getFormElement

        protected org.openqa.selenium.WebElement getFormElement()
      • fillFieldsByName

        public void fillFieldsByName​(Map<String,​String> valuesByNames)
      • fillFieldsByElements

        public void fillFieldsByElements​(Map<org.openqa.selenium.WebElement,​String> valuesByElements)
      • getFieldValue

        public String getFieldValue​(org.openqa.selenium.By findElementBy)
      • setFieldValue

        public void setFieldValue​(org.openqa.selenium.By findElementBy,
                                  String value)
      • hasField

        public boolean hasField​(org.openqa.selenium.By findFieldBy)
      • setFieldValue

        public void setFieldValue​(org.openqa.selenium.WebElement fieldElement,
                                  String value)
      • setCheckBox

        public void setCheckBox​(org.openqa.selenium.By findElementBy,
                                boolean checked)
      • setCheckBox

        public void setCheckBox​(org.openqa.selenium.WebElement checkBoxElement,
                                boolean checked)
      • getFormAction

        public String getFormAction()