Interface HasValueFilter<C extends Component & HasValue<?,V>,V,SELF extends Locator<C,SELF>>

Type Parameters:
C - the component type, bound to HasValue with value type V
V - the value type exposed by the component's HasValue parameterization
SELF - the concrete locator subtype, used for fluent chaining
All Known Implementing Classes:
BigDecimalFieldLocator, CheckboxGroupLocator, CheckboxLocator, ComboBoxLocator, DatePickerLocator, DateTimePickerLocator, DecimalRangeSliderLocator, DecimalSliderLocator, EmailFieldLocator, InputLocator, IntegerFieldLocator, IntegerRangeSliderLocator, IntegerSliderLocator, ListBoxLocator, MultiSelectComboBoxLocator, MultiSelectListBoxLocator, NumberFieldLocator, PasswordFieldLocator, RadioButtonGroupLocator, RangeInputLocator, SelectLocator, TextAreaLocator, TextFieldLocator, TimePickerLocator

public interface HasValueFilter<C extends Component & HasValue<?,V>,V,SELF extends Locator<C,SELF>>
Mixin for Locators whose target component implements HasValue. Exposes the withValue filter that would otherwise be meaningless on components without a value, turning an inapplicable call into a compile error rather than a silent no-op.

The value type V is threaded through the mixin header so the compiler enforces it against the component's actual value type: e.g. findTextField().withValue(42) fails to compile because TextField is HasValue<?, String>, not HasValue<?, Integer>.

  • Method Summary

    Modifier and Type
    Method
    Description
    default SELF
    withValue(V expectedValue)
    Requires the matched component to implement HasValue and to have the given value.
  • Method Details

    • withValue

      default SELF withValue(V expectedValue)
      Requires the matched component to implement HasValue and to have the given value. Has no effect when expectedValue is null.