com.vaadin.flow.component.checkbox.testbench.

Class CheckboxElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.checkbox.testbench.CheckboxElement

All Implemented Interfaces:

CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasHelper, HasLabel, HasPropertySettersGetters, HasSearchContext, HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

public class CheckboxElement extends TestBenchElement implements HasLabel, HasHelper

A TestBench element representing a <vaadin-checkbox> element.

  • Constructor Details

    • CheckboxElement

      public CheckboxElement()
  • Method Details

    • isChecked

      public boolean isChecked()

      Checks whether the checkbox is checked.

      Returns:

      true if the checkbox is checked, false if it is not checked or in indeterminate mode

    • setChecked

      public void setChecked(boolean checked)

      Sets whether the checkbox is checked.

      Parameters:

      checked - true to check the checkbox, false to uncheck it

    • getLabel

      public String getLabel()

      Description copied from interface: HasLabel

      Gets the label for the element.

      Specified by:

      getLabel in interface HasLabel

      Returns:

      the label or an empty string if there is no label