Method: Capybara::Node::Element#unselect_option

Defined in:
lib/capybara/node/element.rb

#unselect_option(wait: nil) ⇒ Capybara::Node::Element

Unselect this node if it is an option element inside a multiple select tag.

If the driver dynamic pages (JS) and the element is currently non-interactable, this method will continuously retry the action until either the element becomes interactable or the maximum wait time expires.

Parameters:

  • wait (false, Numeric) (defaults to: nil)

    Maximum time to wait for the action to succeed. Defaults to default_max_wait_time.

Returns:



150
151
152
153
# File 'lib/capybara/node/element.rb', line 150

def unselect_option(wait: nil)
  synchronize(wait) { base.unselect_option }
  self
end