Playwright

Use soft assertions

Medium70 pts
  • expect.soft
  • Soft Assertions
  • Failure Tolerant
Practice app · Profile Settings

A settings page for clicking, typing, reading text/attributes/CSS and element state.

Test URL
/lab/playwright-use-soft-assertions

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Run multiple independent checks without terminating early on the first failure using soft assertions.

Your Task

  1. 1Navigate to the profile settings page at TEST_URL.
  2. 2Perform a soft assertion to verify that the display name input (#display-name) has value 'Alex Tester'.
  3. 3Perform a soft assertion to verify that the avatar image (#avatar) is visible.
  4. 4Verify that no soft assertions failed during execution (or complete with a standard assertion).

Validation Checks

  • Profile settings page is loaded at TEST_URL
  • Soft assertion verifies display name input (#display-name) value
  • Soft assertion verifies avatar image (#avatar) visibility
  • At least 2 assertions pass

Playwright · Playwright Practice Track · Assertions