Overview
TheEmailFieldElement class is a Playwright wrapper for the <vaadin-email-field> component. It extends TextFieldElement with email-specific validation.
Component Tag
<vaadin-email-field>
Extends
TextFieldElement
Inherited Interfaces
HasValidationPropertiesElement- Validation state and error messagesHasInputFieldElement- Value, label, helper text, and stylingHasPrefixElement- Prefix slot contentHasSuffixElement- Suffix slot contentHasClearButtonElement- Clear button functionalityHasPlaceholderElement- Placeholder textHasAllowedCharPatternElement- Character input restrictionsHasThemeElement- Theme variantsFocusableElement- Focus and blur operationsHasAriaLabelElement- ARIA label supportHasEnabledElement- Enabled/disabled stateHasTooltipElement- Tooltip text
Constructor
The Playwright locator for the
<vaadin-email-field> elementFactory Methods
getByLabel (Page)
Get an email field by its accessible label. Uses ARIA roletextbox.
The Playwright page
The accessible label of the email field
Example
getByLabel (Locator)
Get an email field by its accessible label within a scope.The locator to search within
The accessible label of the email field
Inherited Methods
FromTextFieldElement:
getMinLength()- Get minimum lengthsetMinLength(int min)- Set minimum lengthassertMinLength(Integer min)- Assert minimum lengthgetMaxLength()- Get maximum lengthsetMaxLength(int max)- Set maximum lengthassertMaxLength(Integer max)- Assert maximum lengthgetPattern()- Get validation patternsetPattern(String pattern)- Set validation patternassertPattern(String pattern)- Assert validation pattern
HasValueElement:
getValue()- Get current valuesetValue(String value)- Set field valueclear()- Clear the valueassertValue(String value)- Assert value matches
HasValidationPropertiesElement:
assertValid()- Assert field is validassertInvalid()- Assert field is invalidassertErrorMessage(String message)- Assert error message textgetErrorMessageLocator()- Get error message locator
HasClearButtonElement:
clickClearButton()- Click the clear buttonisClearButtonVisible()- Check if clear button is visibleassertClearButtonVisible()- Assert clear button is visibleassertClearButtonNotVisible()- Assert clear button is not visible
HasPlaceholderElement:
getPlaceholder()- Get placeholder textsetPlaceholder(String placeholder)- Set placeholder textassertPlaceholder(String placeholder)- Assert placeholder matches
FocusableElement:
focus()- Focus the fieldblur()- Blur the fieldgetTabIndex()- Get tab indexassertIsFocused()- Assert field has focusassertIsNotFocused()- Assert field does not have focus
HasLabelElement:
getLabel()- Get label textassertLabel(String label)- Assert label textgetLabelLocator()- Get label locator
HasHelperElement:
getHelperText()- Get helper textassertHelperHasText(String text)- Assert helper textgetHelperLocator()- Get helper locator