Class CheckboxGroup

All Implemented Interfaces:
SpecificConditionHandler, ByLocator, SelenideElementWrapper<CheckboxGroup>

public class CheckboxGroup extends AbstractCheckbox<CheckboxGroup>
Web-element wrapper for checkbox group. Supports selecting or deselecting inner checkboxes, CheckedItems, CheckedItemsContains, CheckedItemsCount condition checking.
  • Constructor Details

    • CheckboxGroup

      public CheckboxGroup(org.openqa.selenium.By by)
  • Method Details

    • resolve

      public SpecificCheck resolve(SpecificCondition condition)
      Description copied from interface: SpecificConditionHandler
      Resolves the passed SpecificCondition into a SpecificCheck that describes how it must be checked for the current handler. The actual verdict is computed centrally by SpecificCondition.check(com.codeborne.selenide.Driver, org.openqa.selenium.WebElement).
      Specified by:
      resolve in interface SpecificConditionHandler
      Overrides:
      resolve in class AbstractCheckbox<CheckboxGroup>
      Parameters:
      condition - condition to resolve
      Returns:
      a SpecificCheck describing how to check the passed condition
    • select

      public CheckboxGroup select(String... checkboxLabels)
      Selects checkboxes with the passed labels.
      Parameters:
      checkboxLabels - checkboxes labels to select
      Returns:
      this to call fluent API
    • select

      public CheckboxGroup select(org.openqa.selenium.By... checkboxBys)
      Selects checkboxes which can be found by the passed By selectors.
      Parameters:
      checkboxBys - By selectors to find checkboxes to select
      Returns:
      this to call fluent API
    • deselect

      public CheckboxGroup deselect(String... checkboxLabels)
      Deselects checkboxes with the passed labels.
      Parameters:
      checkboxLabels - checkboxes labels to deselect
      Returns:
      this to call fluent API
    • deselect

      public CheckboxGroup deselect(org.openqa.selenium.By... checkboxBys)
      Deselects checkboxes which can be found by the passed By selectors.
      Parameters:
      checkboxBys - By selectors to find checkboxes to deselect
      Returns:
      this to call fluent API
    • mapLabelsToBys

      protected org.openqa.selenium.By[] mapLabelsToBys(String... labels)
    • getCheckboxBySelector

      protected org.openqa.selenium.By getCheckboxBySelector(String checkboxLabel)
    • getCheckboxInput

      protected com.codeborne.selenide.SelenideElement getCheckboxInput(org.openqa.selenium.By checkboxBy)
    • getCheckboxLabelTexts

      protected List<String> getCheckboxLabelTexts()
    • isCheckboxSelected

      protected boolean isCheckboxSelected(org.openqa.selenium.By checkboxBy)