Overview
TheIntegerFieldElement class is a Playwright wrapper for the <vaadin-integer-field> component. It provides methods to interact with integer input fields, including min/max/step constraints and step controls.
Component Tag
<vaadin-integer-field>
Extends
AbstractNumberFieldElement
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-integer-field> elementFactory Methods
getByLabel (Page)
Get an integer field by its accessible label. Uses ARIA rolespinbutton.
The Playwright page
The accessible label of the integer field
Example
getByLabel (Locator)
Get an integer field by its accessible label within a scope.The locator to search within
The accessible label of the integer field
Methods
getStep
Get the current step value.Integer, or null if not set
setStep
Set the step value.The step to apply
assertStep
Assert the step attribute matches the expected value.The expected step, or
null to assert no explicit step is setgetMin
Get the current minimum value.Integer, or null if not set
setMin
Set the minimum value.The minimum to apply
assertMin
Assert the min attribute matches the expected value.The expected minimum, or
null to assert no explicit minimum is setgetMax
Get the current maximum value.Integer, or null if not set
setMax
Set the maximum value.The maximum to apply
assertMax
Assert the max attribute matches the expected value.The expected maximum, or
null to assert no explicit maximum is setInherited Methods
FromAbstractNumberFieldElement:
getHasControls()- Check if step controls are visibleassertHasControls(boolean hasControls)- Assert step controls visibilityclickIncreaseButton()- Click the increase buttonclickDecreaseButton()- Click the decrease button
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
FocusableElement:
focus()- Focus the fieldblur()- Blur the fieldgetTabIndex()- Get tab indexassertIsFocused()- Assert field has focusassertIsNotFocused()- Assert field does not have focus