Function When_I_find_element_by_alt_text

  • When I find element by alt text:

    When I find element by alt text {string}
    

    Finds the first element (e.g., <img>) that matches the alt text.

    Parameters

    • altText: string

    Returns void

    When I find element by alt text "Text"
    

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

    When I find element by alt text "Text"
    And I click

    Inspired by Testing Library's ByAltText.