playwright-test-commons - v0.8.0
    Preparing search index...

    Function expectNoA11yViolations

    • Scans the page with axe-core and asserts (soft) that it has no violations. Each violation is reported as one line: the rule, its impact, how many elements it hit and the first few of them.

      Parameters

      • page: Page

        the page to scan, after it has loaded the state to check

      • options: A11yOptions = {}

      Returns Promise<void>

      Error if @axe-core/playwright isn't installed

      await home.open();
      await expectNoA11yViolations(page);