Method: Capybara::Session#fill_in

Defined in:
lib/capybara/session.rb

#fill_in(locator, options = {}) ⇒ Object



65
66
67
68
69
# File 'lib/capybara/session.rb', line 65

def fill_in(locator, options={})
  msg = "cannot fill in, no text field, text area or password field with id, name, or label '#{locator}' found"
  raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with)
  locate(:xpath, XPath.fillable_field(locator), msg).set(options[:with])
end