lib/capybara/node/actions.rb in capybara-2.3.0 vs lib/capybara/node/actions.rb in capybara-2.4.0

- old
+ new

@@ -43,15 +43,18 @@ # The field can be found via its name, id or label text. # # page.fill_in 'Name', :with => 'Bob' # # @param [String] locator Which field to fill in - # @param [Hash{:with => String}] options The value to fill in + # @param [Hash] options + # @option options [String] :with The value to fill in - required + # @option options [Hash] :fill_options Driver specific options regarding how to fill fields # def fill_in(locator, options={}) raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with) with = options.delete(:with) - find(:fillable_field, locator, options).set(with) + fill_options = options.delete(:fill_options) + find(:fillable_field, locator, options).set(with, fill_options) end ## # # Find a radio button and mark it as checked. The radio button can be found