Playwright Cucumber TS Steps
    Preparing search index...

    Function expectElementToCloselyMatch

    • Compares a specific element with a reference image.

      Parameters

      • page: any

        The Playwright page object

      • selectorKey: string

        The selector key (can be a fixture key or raw CSS selector)

      • currentFilename: string

        The filename of the current element screenshot

      • referenceFilename: string

        The filename of the reference screenshot to compare with

      Returns Promise<void>

      Then I pw expect element "div.content" screenshot "content-current.png" to closely match "content-reference.png"