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

    • 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 AbstractCheckbox<CheckboxGroup>
      Parameters:
      condition - condition to check
      Returns:
      CheckResult that contains CheckResult.Verdict.ACCEPT if the current handler matches the passed SpecificCondition, CheckResult.Verdict.REJECT otherwise
    • 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)