module Capybara::Node::Actions

def unselect(value = nil, from: nil, **options)

Returns:
  • (Capybara::Node::Element) - The option element unselected

Parameters:
  • from (String) -- The id, {Capybara.configure test_id} attribute, name or label of the select box
  • value (String) -- Which option to unselect

Overloads:
  • unselect(value = nil, from: nil, **options)
def unselect(value = nil, from: nil, **options)
  raise ArgumentError, 'The :from option does not take an element' if from.is_a? Capybara::Node::Element
  scope = from ? find(:select, from, **options) : self
  scope.find(:option, value, **options).unselect_option
end