Function When_I_find_elements_by_label_text

  • When I find elements by label text:

    When I find elements by label text {string}
    

    Find all visible label, aria-labelledby, or aria-label that matches the text.

    Parameters

    • text: string
    • Optionaloptions: DataTable

    Returns void

    When I find elements by label text "Email"
    

    With options:

    When I find elements by label text "Email"
    | log | true |
    | timeout | 4000 |
    | withinSubject | null |
    | includeShadowDom | false |
    | pseudoSelector | visible |

    This precedes steps like "When I type". For example:

    When I find elements by label text "Email"
    And I get 1st element
    And I type "[email protected]"

    Inspired by Testing Library's ByLabelText.