Package org.xwiki.test.ui.po
Class FormContainerElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.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 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFormContainerElement.SelectElement
-
Constructor Summary
Constructors Constructor Description FormContainerElement(org.openqa.selenium.By formSelector)The form element is retrieved through the given selector.FormContainerElement(org.openqa.selenium.WebElement formContainer)The form element is retrieved through its container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillFieldsByElements(Map<org.openqa.selenium.WebElement,String> valuesByElements)voidfillFieldsByName(Map<String,String> valuesByNames)StringgetFieldValue(org.openqa.selenium.By findElementBy)StringgetFormAction()protected org.openqa.selenium.WebElementgetFormElement()FormContainerElement.SelectElementgetSelectElement(org.openqa.selenium.By by)booleanhasField(org.openqa.selenium.By findFieldBy)voidsetCheckBox(org.openqa.selenium.By findElementBy, boolean checked)voidsetCheckBox(org.openqa.selenium.WebElement checkBoxElement, boolean checked)voidsetFieldValue(org.openqa.selenium.By findElementBy, String value)voidsetFieldValue(org.openqa.selenium.WebElement fieldElement, String value)-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
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()
-
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()
-
getSelectElement
public FormContainerElement.SelectElement getSelectElement(org.openqa.selenium.By by)
-
-