Asercje w Playwright

.toBeAttached()
.toBeChecked()
.toBeDisabled()
.toBeEditable()
.toBeEmpty()
.toBeEnabled()
.toBeFocused()
.toBeHidden()
.toBeInViewport()
.toBeVisible()
.toContainText()
.toHaveAccessibleDescription()
.toHaveAccessibleName()
.toHaveAttribute()
.toHaveClass()
.toHaveCount()
.toHaveCSS()
.toHaveId()
.toHaveJSProperty()
.toHaveRole()
.toHaveScreenshot()
.toHaveText()
.toHaveValue()
.toHaveValues()

.toHaveScreenshot()
.toHaveTitle()
.toHaveURL()

.toBeOK()

Element is attached
Checkbox is checked
Element is disabled
Element is editable
Container is empty
Element is enabled
Element is focused
Element is not visible
Element intersects viewport
Element is visible
Element contains text
Element has a matching accessible description
Element has a matching accessible name
Element has a DOM attribute
Element has a class property
List has exact number of children
Element has CSS property
Element has an ID
Element has a JavaScript property
Element has a specific ARIA role
Element has a screenshot
Element matches text
Input has a value
Select has options selected

Page has a screenshot
Page has a title
Page has a URL

Response has an OK status

Dodaj komentarz