public class Select2WidgetElement extends WebFragmentImpl
Modifier and Type | Field and Description |
---|---|
protected boolean |
multiple |
driver, element
Constructor and Description |
---|
Select2WidgetElement(org.openqa.selenium.WebDriver driver,
String id)
Constructor.
|
Select2WidgetElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element)
Constructor.
|
Select2WidgetElement(org.openqa.selenium.WebDriver driver,
org.openqa.selenium.WebElement element,
boolean multiple)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSuggestInput()
Clear the input of the select2.
|
void |
clickSelect2Field()
Click on the select2 field.
|
org.openqa.selenium.WebElement |
getSelectedValue() |
List<org.openqa.selenium.WebElement> |
getSelectedValues() |
protected String |
getSubmittedValue() |
List<org.openqa.selenium.WebElement> |
getSuggestedEntries() |
void |
hideSuggestionsByEscapeKey() |
void |
removeFromSelection(String displayedText) |
void |
removeSelection() |
void |
selectValue(String value)
Select a single value.
|
void |
selectValue(String value,
boolean wait4A4J) |
void |
selectValue(String value,
boolean wait4A4J,
boolean typeAll)
Select given value, waiting for JSF ajax requests or not, and typing the whole suggestion or not (use false speed
up selection when exactly one suggestion is found, use true when creating new suggestions).
|
void |
selectValue(String value,
boolean wait4A4J,
boolean typeAll,
boolean click) |
void |
selectValues(String[] values)
Select multiple values.
|
List<org.openqa.selenium.WebElement> |
typeAndGetResult(String value)
Type a value in the select2 and return the suggested entries.
|
SearchPage |
typeValueAndTypeEnter(String value)
Type a value in the select2 and then simulate the enter key.
|
checkTextToBeNotPresent, checkTextToBePresent, clear, click, containsText, findElement, findElements, getAttribute, getCssValue, getElement, getId, getLocation, getSize, getTagName, getText, getWebFragment, getWebFragment, isDisplayed, isEnabled, isSelected, sendKeys, setElement, submit, waitForTextToBePresent
protected boolean multiple
public Select2WidgetElement(org.openqa.selenium.WebDriver driver, String id)
driver
- the driverid
- the id of the widgetpublic Select2WidgetElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element)
driver
- the driverby
- the by locator of the widgetpublic Select2WidgetElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element, boolean multiple)
driver
- the driverby
- the by locator of the widgetmultiple
- whether the widget can have multiple valuespublic org.openqa.selenium.WebElement getSelectedValue()
public List<org.openqa.selenium.WebElement> getSelectedValues()
protected String getSubmittedValue()
public List<org.openqa.selenium.WebElement> getSuggestedEntries()
public void removeSelection()
public void removeFromSelection(String displayedText)
public void selectValue(String value)
value
- the value to be selectedpublic void selectValue(String value, boolean wait4A4J)
public void selectValue(String value, boolean wait4A4J, boolean typeAll)
value
- string typed in the suggest boxwait4A4J
- use true if request is triggering JSF ajax callstypeAll
- use false speed up selection when exactly one suggestion is found, use true when creating new
suggestions.public void selectValue(String value, boolean wait4A4J, boolean typeAll, boolean click)
public void selectValues(String[] values)
values
- the valuespublic List<org.openqa.selenium.WebElement> typeAndGetResult(String value)
value
- The value to type in the select2.public void clickSelect2Field()
public void clearSuggestInput()
public SearchPage typeValueAndTypeEnter(String value)
public void hideSuggestionsByEscapeKey()
Copyright © 2018 Nuxeo. All rights reserved.