AvatarElement
Playwright element wrapper for<vaadin-avatar> providing helpers to read and modify avatar properties (name, abbreviation, image, color index).
Component Tag
vaadin-avatar
Implements
FocusableElement- Focus managementHasStyleElement- CSS class and style managementHasThemeElement- Theme variant supportHasTooltipElement- Tooltip text
Constructor
Locator
required
Playwright locator for the
<vaadin-avatar> elementStatic Factory Methods
get
Get the first avatar on the page or within a scope.Page
Playwright page
Locator
Scope containing the avatar
getByName
Get an avatar by its name attribute.Page
Playwright page
Locator
Scope containing the avatar
String
Avatar’s name attribute value
Property Methods
getName
Get the avatar’s name.setName
Set the avatar’s name.String
Name to set
getAbbreviation
Get the displayed abbreviation.setAbbreviation
Set the abbreviation.String
Abbreviation to display
getImage
Get the image URL.setImage
Set the image URL.String
Image URL to set
getColorIndex
Get the background color index.setColorIndex
Set the background color index.int
Color index to set
Assertion Methods
assertName
Assert the avatar’s name property value.String
Expected name
assertAbbreviation
Assert the avatar’s abbreviation.String
Expected abbreviation