Class Select2Element
java.lang.Object
com.atlassian.pageobjects.elements.WebDriverElement
com.atlassian.bamboo.pageobjects.elements.Select2Element
- All Implemented Interfaces:
com.atlassian.pageobjects.elements.PageElement,com.atlassian.pageobjects.elements.PageElementFinder,com.atlassian.pageobjects.elements.search.PageElementSearch
public class Select2Element
extends com.atlassian.pageobjects.elements.WebDriverElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.atlassian.pageobjects.elements.PageElementFinderFields inherited from class com.atlassian.pageobjects.elements.WebDriverElement
defaultTimeout, driver, locatable, pageBinder, timeouts, TO_LOCATABLE -
Constructor Summary
ConstructorsConstructorDescriptionSelect2Element(org.openqa.selenium.By locator) Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType) Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.WebDriverLocatable parent) Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.WebDriverLocatable parent, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType) -
Method Summary
Modifier and TypeMethodDescriptionclear()voidclickElement(String jQuerySelector) intenterValue(String choiceToSelect) Selects the given choice.enterValue(String search, String choiceToSelect) Enter search term and select the given choice.enterValue(String search, Predicate<String> choicePredicate) Enter search term and select a choice that matches the predicate.enterValue(String search, Predicate<String> choicePredicate, String expectedSelection) Enter search term and select a choice that matches the predicate.com.atlassian.pageobjects.elements.PageElementcom.atlassian.pageobjects.elements.PageElementcom.atlassian.pageobjects.elements.PageElementcom.atlassian.pageobjects.elements.PageElementgetInput()@Nullable StringGet currently selected value from a single-select element.Get all selected values from a multi-select element.<T> @NotNull List<T> com.atlassian.pageobjects.elements.query.TimedConditioncom.atlassian.pageobjects.elements.query.TimedConditionbooleanbooleanbooleanisValueSelected(@NotNull String value) booleansearchAndWait(String searchTerm, boolean expectResults) voidSelect value from dropdown list without interaction with search.voidselectByOptionValue(String optionValue) voidMethods inherited from class com.atlassian.pageobjects.elements.WebDriverElement
asWebElement, bind, click, createTimout, find, find, find, find, findAll, findAll, findAll, findAll, getAttribute, getCssClasses, getDefaultTimeout, getId, getLocation, getSize, getTagName, getText, getValue, hasAttribute, hasClass, isPresent, isSelected, javascript, search, select, timed, timeout, toLocatable, toString, type, waitForWebElement, waitForWebElement, withTimeout
-
Field Details
-
elementFinder
@Inject protected com.atlassian.pageobjects.elements.PageElementFinder elementFinder
-
-
Constructor Details
-
Select2Element
@Inject public Select2Element(org.openqa.selenium.By locator) -
Select2Element
@Inject public Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.WebDriverLocatable parent) -
Select2Element
@Inject public Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType) -
Select2Element
@Inject public Select2Element(org.openqa.selenium.By locator, com.atlassian.pageobjects.elements.WebDriverLocatable parent, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType)
-
-
Method Details
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfacecom.atlassian.pageobjects.elements.PageElement- Overrides:
isVisiblein classcom.atlassian.pageobjects.elements.WebDriverElement
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfacecom.atlassian.pageobjects.elements.PageElement- Overrides:
isEnabledin classcom.atlassian.pageobjects.elements.WebDriverElement
-
getContainer
public com.atlassian.pageobjects.elements.PageElement getContainer() -
getDropdownTrigger
public com.atlassian.pageobjects.elements.PageElement getDropdownTrigger() -
getDropDown
public com.atlassian.pageobjects.elements.PageElement getDropDown() -
isMultiSelect
public boolean isMultiSelect() -
getInput
public com.atlassian.pageobjects.elements.PageElement getInput() -
enterValue
Selects the given choice.- Parameters:
choiceToSelect- determines which option to choose
-
enterValue
Enter search term and select the given choice.- Parameters:
search- search termchoiceToSelect- determines which option to choose
-
enterValue
Enter search term and select a choice that matches the predicate.- Parameters:
search- search termchoicePredicate- determines which option to choose
-
enterValue
public Select2Element enterValue(String search, Predicate<String> choicePredicate, String expectedSelection) Enter search term and select a choice that matches the predicate. Use this method directly only if the selection is formatted differently than options to select.- Parameters:
search- search termchoicePredicate- determines which option to chooseexpectedSelection- what result is expected to be selected in the end
-
clickDropDown
-
clickElement
-
waitForJQueryToBeActive
public void waitForJQueryToBeActive() -
clickDropDownDontWait
-
openDropDown
-
closeDropdown
-
searchAndWait
-
countChoices
public int countChoices() -
clear
- Specified by:
clearin interfacecom.atlassian.pageobjects.elements.PageElement- Overrides:
clearin classcom.atlassian.pageobjects.elements.WebDriverElement
-
type
-
getValues
-
getValues
-
isDisabled
public com.atlassian.pageobjects.elements.query.TimedCondition isDisabled() -
getSelectedValue
Get currently selected value from a single-select element. -
getSelectedValues
Get all selected values from a multi-select element. -
isValueSelected
-
isDropDownOpen
public com.atlassian.pageobjects.elements.query.TimedCondition isDropDownOpen() -
select
Select value from dropdown list without interaction with search. Usefull for Select2Element without search field. -
selectByOptionValue
-
getOptionValue
-