Module: SimpleFormDatetimepicker::CapybaraHelpers

Defined in:
lib/simple_form_datetimepicker/capybara_helpers.rb

Instance Method Summary collapse

Instance Method Details

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



3
4
5
6
7
# File 'lib/simple_form_datetimepicker/capybara_helpers.rb', line 3

def fill_in_dtp(locator, options={})
  locator = find('label', text: locator)[:for] if page.has_css?('label', text: locator)
  fill_in locator, :with => ''
  fill_in locator, options
end