Function When_I_find_elements_by_alt_text

  • When I find elements by alt text:

    When I find elements by alt text {string}
    

    Finds elements (e.g., <img>) that match the alt text.

    Parameters

    • altText: string

    Returns void

    When I find elements by alt text "Image Description"
    

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

    When I find elements by alt text "Text"
    And I get 1st element
    And I click

    Inspired by Testing Library's ByAltText.