Overview
HasSuffixElement provides utilities to interact with Vaadin components that implement the HasSuffix interface, which allows placing content in a suffix slot. The suffix typically appears at the end of the component, after the main input or content area.
This mixin interface extends HasLocatorElement and provides default implementations for accessing, reading, and asserting suffix slot content.
Interface
Methods
getSuffixLocator()
Returns a locator for the suffix slot content.Locator targeting the first element with slot="suffix"
Implementation:
getSuffixText()
Retrieves the text content of the suffix slot.assertSuffixHasText()
Asserts that the suffix slot has the expected text, or is hidden when null.String
Expected text content of the suffix. If
null, asserts that the suffix is not visible.- If
textis non-null: Asserts the suffix has exactly that text - If
textis null: Asserts the suffix is not visible
Implementing Classes
The following element classes implementHasSuffixElement:
TextFieldElement- Text input fieldsBigDecimalFieldElement- Decimal number fieldsAbstractNumberFieldElement- Base class for number fieldsButtonElement- Action buttonsSideNavigationItemElement- Navigation items
Usage Examples
Basic Suffix Access
Custom Suffix Interactions
Asserting Suffix Visibility
Integration Test Example
Button with Suffix Example
Related Interfaces
- HasLocatorElement - Parent interface
- HasPrefixElement - Companion interface for prefix slot content
Vaadin Documentation
For more information about the VaadinHasSuffix interface, see the Vaadin Components documentation.