Package com.vaadin.browserless.locator
Interface HasPlaceholderFilter<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasPlaceholder,SELF extends Locator<C,SELF>>
- Type Parameters:
C- the component type, bound toHasPlaceholderSELF- the concrete locator subtype, used for fluent chaining
- All Known Implementing Classes:
BigDecimalFieldLocator,ComboBoxLocator,DatePickerLocator,EmailFieldLocator,InputLocator,IntegerFieldLocator,MultiSelectComboBoxLocator,NumberFieldLocator,PasswordFieldLocator,SelectLocator,TextAreaLocator,TextFieldLocator,TimePickerLocator
public interface HasPlaceholderFilter<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasPlaceholder,SELF extends Locator<C,SELF>>
Mixin for
Locators whose target component implements
HasPlaceholder. Exposes placeholder-based filter methods that would
be meaningless on components without a placeholder, turning a call like
findButton().withPlaceholder("...") (Button is not
HasPlaceholder) into a compile error rather than a silent no-op.- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault SELFwithPlaceholder(String placeholder) Requires the matched component'splaceholderto be exactly the given value.default SELFRequires the matched component'splaceholderto contain the given text.
-
Method Details
-
withPlaceholder
Requires the matched component'splaceholderto be exactly the given value. Useful for toolbar / search fields that intentionally omit a stacked label and identify themselves to the user via placeholder text instead.- Parameters:
placeholder- the expected placeholder- Returns:
- this locator, for chaining
-
withPlaceholderContaining
Requires the matched component'splaceholderto contain the given text.- Parameters:
text- the expected text- Returns:
- this locator, for chaining
-