Function When_I_get_nth_element

  • When I get nth element:

    When I get {int}st element
    When I get {int}nd element
    When I get {int}rd element
    When I get {int}th element

    Parameters

    • position: number

      A number indicating the position to find the element within an array of elements (starts with 1). If negative, the number indicates the position from the end to find the element.

    Returns void

    When I get 1st element
    When I get 2nd element
    When I get 3rd element
    When I get 4th element

    This follows steps like "When I find links by text" and precedes steps like "When I click". For example:

    When I find links by text "Link"
    And I get 5th element
    And I click