Method: Splinter::Capybara::Actions#select_time
- Defined in:
- lib/splinter/capybara/actions.rb
#select_time(time, options = {}) ⇒ Object
Selects hour and minute dropdowns for a time attribute.
time - A Time object that will be used to choose options. options - A Hash containing one of:
:id_prefix - the prefix of each dropdown's CSS ID (eg:
:post_publish_at for #post_publish_at_1i, etc)
:from - The text in a label for this dropdown (eg:
"Publish At" for <label for="#publish_at_1i">)
82 83 84 85 86 87 |
# File 'lib/splinter/capybara/actions.rb', line 82 def select_time(time, = {}) id = () find_and_select_option "#{id}_4i", "%02d" % time.hour find_and_select_option "#{id}_5i", "%02d" % time.min end |