Playwright Cucumber TS Steps
    Preparing search index...

    Function takeElementScreenshot

    • Takes a screenshot of a specific element.

      Parameters

      • page: any

        The Playwright page object

      • selectorKey: string

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

      • filename: string

        The filename to save the screenshot as

      Returns Promise<void>

      When I pw take a screenshot of element "header.navbar" as "navbar.png"