Interface HasLabelFilter

  • All Implemented Interfaces:

    
    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 com.vaadin.flow.component.HasText, not HasLabel) into a compile error rather than a silent no-op.

    Since:

    1.1

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      SELF withLabel(String label) Requires the matched component's label property to be exactly the given value.
      SELF withLabelContaining(String text) Requires the matched component's label property to contain the given text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • withLabel

         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.