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
Modifier and TypeFieldDescriptionprotected com.atlassian.pageobjects.elements.PageElementFinder
Fields inherited from class com.atlassian.pageobjects.elements.WebDriverElement
defaultTimeout, driver, locatable, pageBinder, timeouts, TO_LOCATABLE
-
Constructor Summary
ConstructorDescriptionSelect2Element
(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()
void
clickElement
(String jQuerySelector) int
enterValue
(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.PageElement
com.atlassian.pageobjects.elements.PageElement
com.atlassian.pageobjects.elements.PageElement
com.atlassian.pageobjects.elements.PageElement
getInput()
@Nullable String
Get 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.TimedCondition
com.atlassian.pageobjects.elements.query.TimedCondition
boolean
boolean
boolean
isValueSelected
(@NotNull String value) boolean
void
Select value from dropdown list without interaction with search.void
selectByOptionValue
(String optionValue) void
Methods 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:
isVisible
in interfacecom.atlassian.pageobjects.elements.PageElement
- Overrides:
isVisible
in classcom.atlassian.pageobjects.elements.WebDriverElement
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfacecom.atlassian.pageobjects.elements.PageElement
- Overrides:
isEnabled
in 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
-
countChoices
public int countChoices() -
clear
- Specified by:
clear
in interfacecom.atlassian.pageobjects.elements.PageElement
- Overrides:
clear
in 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
-