Class AbstractMultiSelectComboBox<T extends AbstractMultiSelectComboBox<T>>

Type Parameters:
T - inheritor class type
All Implemented Interfaces:
SpecificConditionHandler, ByLocator, SelenideElementWrapper<T>
Direct Known Subclasses:
MultiSelectComboBox, MultiSelectComboBoxPicker

public abstract class AbstractMultiSelectComboBox<T extends AbstractMultiSelectComboBox<T>> extends AbstractComboBox<T>
Abstract class for multi-select combobox web-element wrappers. Supports setting value, SelectedItems, SelectedItemsContains, SelectedItemsCount and Label condition checking.
  • Constructor Details

    • AbstractMultiSelectComboBox

      protected AbstractMultiSelectComboBox(org.openqa.selenium.By by)
  • Method Details

    • getItemsOverlayElement

      protected ComboBoxOverlay<T> getItemsOverlayElement()
      Overrides:
      getItemsOverlayElement in class AbstractComboBox<T extends AbstractMultiSelectComboBox<T>>
      Returns:
      current opened overlay wrapper for the combobox
    • setValue

      public T setValue(String... value)
      Sets a value to multi-select combobox.
      Parameters:
      value - value items to set
      Returns:
      this to call fluent API
    • setValue

      public T setValue(List<String> value)
      Sets a value to multi-select combobox.
      Parameters:
      value - list of value items to set
      Returns:
      this to call fluent API
    • check

      public com.codeborne.selenide.CheckResult check(SpecificCondition condition)
      Description copied from interface: SpecificConditionHandler
      Checks whether the current handler matches the passed SpecificCondition.
      Specified by:
      check in interface SpecificConditionHandler
      Overrides:
      check in class AbstractField<T extends AbstractMultiSelectComboBox<T>>
      Parameters:
      condition - condition to check
      Returns:
      CheckResult that contains CheckResult.Verdict.ACCEPT if the current handler matches the passed SpecificCondition, CheckResult.Verdict.REJECT otherwise
    • clearValue

      protected void clearValue()
    • getValue

      protected List<String> getValue()
    • closeOverlay

      protected void closeOverlay()
    • getElementIterator

      protected Iterator<com.codeborne.selenide.SelenideElement> getElementIterator(org.openqa.selenium.By overlayBy)
      Creates and returns iterator for multi-select combobox overlay items.
      Parameters:
      overlayBy - By selector for multi-select combobox overlay
      Returns:
      iterator for overlay items