Method: Capybara::Node::Element#set
- Defined in:
- lib/capybara/node/element.rb
#set(value, **options) ⇒ Capybara::Node::Element
Set the value of the form element to the given value.
117 118 119 120 121 122 123 124 125 |
# File 'lib/capybara/node/element.rb', line 117 def set(value, **) if ENV.fetch('CAPYBARA_THOROUGH', nil) && readonly? raise Capybara::ReadOnlyElementError, "Attempt to set readonly element with value: #{value}" end = ..to_h.merge() synchronize { base.set(value, **) } self end |