Interface HasThemeFilter<C extends Component & HasTheme,SELF extends Locator<C,SELF>>

Type Parameters:
C - the component type, bound to HasTheme
SELF - the concrete locator subtype, used for fluent chaining
All Known Implementing Classes:
BigDecimalFieldLocator, BreadcrumbsLocator, ButtonLocator, ChartLocator, CheckboxGroupLocator, CheckboxLocator, ComboBoxLocator, DashboardLocator, DatePickerLocator, DateTimePickerLocator, DetailsLocator, DialogLocator, EmailFieldLocator, GridLocator, IntegerFieldLocator, MenuBarLocator, MessageInputLocator, MultiSelectComboBoxLocator, NotificationLocator, NumberFieldLocator, PasswordFieldLocator, PopoverLocator, RadioButtonGroupLocator, SelectLocator, SideNavLocator, TabSheetLocator, TabsLocator, TextAreaLocator, TextFieldLocator, TimePickerLocator, UploadLocator, VirtualListLocator

public interface HasThemeFilter<C extends Component & HasTheme,SELF extends Locator<C,SELF>>
Mixin for Locators whose target component implements HasTheme. Exposes theme-based filter methods that would be meaningless on components without theme support, turning an inapplicable call into a compile error rather than a silent no-op.
Since:
1.1
  • Method Details

    • withTheme

      default SELF withTheme(ThemeVariant variant)
      Requires the matched component to have the given theme variant set. Prefer this over the raw-string withTheme(String) so the IDE can autocomplete the variant and a typo becomes a compile error.
      
       ui.findButton().withTheme(ButtonVariant.LUMO_PRIMARY).click();
       
    • withTheme

      @Deprecated default SELF withTheme(String theme)
      Deprecated.
      use withTheme(ThemeVariant) with the component's typed variant enum where possible. This raw-string overload remains for themes not surfaced through a ThemeVariant enum.
      Requires the matched component to have the given theme set.
    • withoutTheme

      default SELF withoutTheme(ThemeVariant variant)
      Requires the matched component to not have the given theme variant set. Prefer this over the raw-string withoutTheme(String) for the same reasons as withTheme(ThemeVariant).
    • withoutTheme

      @Deprecated default SELF withoutTheme(String theme)
      Deprecated.
      use withoutTheme(ThemeVariant) with the component's typed variant enum where possible.
      Requires the matched component to not have the given theme set.