lib/cucumber/rails/capybara/select_dates_and_times.rb
# Select a Rails time. Options hash must include from: +label+
Select a Rails time. Options hash must include from: +label+
Select a Rails time . Options hash must include from : + label +
def select_time(time, options)
          time        = Time.zone.parse(time)
          base_dom_id = get_base_dom_id_from_label_tag(options[:from])
          find(:xpath, ".//select[@id='#{base_dom_id}_4i']").select(time.hour.to_s.rjust(2, '0'))
          find(:xpath, ".//select[@id='#{base_dom_id}_5i']").select(time.min.to_s.rjust(2,  '0'))
        end
def select_time ( time , options ) time = Time . zone . parse ( time ) base_dom_id = get_base_dom_id_from_label_tag ( options [ :from ] ) find ( :xpath , ".//select[@id='#{base_dom_id}_4i']" ) . select ( time . hour . to_s . rjust ( 2 , '0' ) ) find ( :xpath , ".//select[@id='#{base_dom_id}_5i']" ) . select ( time . min . to_s . rjust ( 2 , '0' ) ) end
Select a Rails time.
Select a Rails time .
time
<not_specific>
options
<not_specific>