Interface HasLabelFilter<C extends Component & HasLabel,SELF extends Locator<C,SELF>>

Type Parameters:
C - the component type, bound to HasLabel
SELF - the concrete locator subtype, used for fluent chaining
All Known Implementing Classes:
BigDecimalFieldLocator, CheckboxGroupLocator, CheckboxLocator, ComboBoxLocator, DatePickerLocator, DateTimePickerLocator, DecimalRangeSliderLocator, DecimalSliderLocator, EmailFieldLocator, IntegerFieldLocator, IntegerRangeSliderLocator, IntegerSliderLocator, MultiSelectComboBoxLocator, NumberFieldLocator, PasswordFieldLocator, RadioButtonGroupLocator, SelectLocator, TextAreaLocator, TextFieldLocator, TimePickerLocator

public interface HasLabelFilter<C extends Component & HasLabel,SELF extends Locator<C,SELF>>
Mixin for Locators whose target component implements HasLabel. Exposes label-based filter methods that would be meaningless on components without a label, turning a call like findButton().withLabel("Save") (Button is HasText, not HasLabel) into a compile error rather than a silent no-op.
  • Method Summary

    Modifier and Type
    Method
    Description
    default SELF
    Requires the matched component's label property to be exactly the given value.
    default SELF
    Requires the matched component's label property to contain the given text.
  • Method Details

    • withLabel

      default SELF withLabel(String label)
      Requires the matched component's label property to be exactly the given value. Use this for form fields where the end user identifies a field by its label.
    • withLabelContaining

      default SELF withLabelContaining(String text)
      Requires the matched component's label property to contain the given text.