Method: Watir::Adjacent#following_siblings

Defined in:
lib/watir/adjacent.rb

#following_siblings(opt = {}) ⇒ Object Also known as: next_siblings

Returns collection of following sibling elements of current element.

Examples:

browser.text_field(name: "new_user_first_name").following_siblings.size
#=> 55

Raises:

  • (ArgumentError)


67
68
69
70
71
# File 'lib/watir/adjacent.rb', line 67

def following_siblings(opt = {})
  raise ArgumentError, '#next_siblings can not take an index value' if opt[:index]

  xpath_adjacent(opt.merge(adjacent: :following, plural: true))
end