Playwright Cucumber TS Steps
    Preparing search index...

    Function clickNthElementBySelector

    • Clicks on the Nth element matching a CSS or XPath selector.

      Parameters

      • page: any

        The Playwright page object

      • indexStr: string

        The index string (1st, 2nd, 3rd, etc.)

      • selectorKey: string

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

      • Optionaltable: any

        Optional table data for click options

      Returns Promise<void>

      When I pw click on 1st selector ".btn"