Method: Splinter::Capybara::Actions#select_date
- Defined in:
- lib/splinter/capybara/actions.rb
#select_date(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">)
97 98 99 100 101 102 103 |
# File 'lib/splinter/capybara/actions.rb', line 97 def select_date(time, ={}) id = () find_and_select_option "#{id}_1i", time.year find_and_select_option "#{id}_2i", time.month find_and_select_option "#{id}_3i", time.day end |