Playwright Cucumber TS Steps
    Preparing search index...

    Function clickNthElementByText

    • Clicks on the Nth element containing the specified text. Handles 1st, 2nd, 3rd, 4th, etc.

      Parameters

      • page: any

        The Playwright page object

      • indexStr: string

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

      • text: string

        The text to search for

      • Optionaltable: any

        Optional table data for click options

      Returns Promise<void>

      When I pw click on 1st element "Login"
      When I pw click on 2nd element "Submit"