Class StaticListItemsEditor
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.appwithinminutes.test.po.StaticListItemsEditor
-
public class StaticListItemsEditor extends BaseElement
Represents the static list items editor present on the configuration pane of a static list field.- Since:
- 4.2M1
- Version:
- $Id: 66b12a187a583b79fd22f037a4bbef7b92e0ebc1 $
-
-
Constructor Summary
Constructors Constructor Description StaticListItemsEditor(org.openqa.selenium.WebElement container)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String value, String label)
Adds a new item with the specified value and label.org.openqa.selenium.WebElement
getItem(String valueOrLabel)
org.openqa.selenium.WebElement
getLabelInput()
org.openqa.selenium.WebElement
getValueInput()
void
moveBefore(String valueToMove, String beforeValue)
Reorders list items.void
remove(String value)
Removes the item with the specified value.void
setLabel(String value, String newLabel)
Changes item label.int
size()
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
remove
public void remove(String value)
Removes the item with the specified value.- Parameters:
value
- the value of the item to be removed
-
add
public void add(String value, String label)
Adds a new item with the specified value and label.- Parameters:
value
- item valuelabel
- item label
-
getValueInput
public org.openqa.selenium.WebElement getValueInput()
- Returns:
- the text input used to specify the item value
-
getLabelInput
public org.openqa.selenium.WebElement getLabelInput()
- Returns:
- the text input used to specify the item label
-
setLabel
public void setLabel(String value, String newLabel)
Changes item label.- Parameters:
value
- item valuenewLabel
- the new item label
-
moveBefore
public void moveBefore(String valueToMove, String beforeValue)
Reorders list items.- Parameters:
valueToMove
- the value of the item to be movedbeforeValue
- the value of the reference item
-
getItem
public org.openqa.selenium.WebElement getItem(String valueOrLabel)
- Parameters:
valueOrLabel
- the value of the label of a list item- Returns:
- the first list item that has the specified value or label
-
size
public int size()
- Returns:
- the number of list items
-
-