Module: ElabsMatchers::Helpers::SelectYearAndMonth
- Defined in:
- lib/elabs_matchers/helpers/select_year_and_month.rb
Instance Method Summary collapse
-
#select_year_and_month(year, month, options = {}) ⇒ Object
Selects a year and a month on a rails date select input field.
Instance Method Details
#select_year_and_month(year, month, options = {}) ⇒ Object
Selects a year and a month on a rails date select input field.
Example: select_year_and_month(“2010”, “March”, :from => “Birth date”)
19 20 21 22 23 24 25 |
# File 'lib/elabs_matchers/helpers/select_year_and_month.rb', line 19 def select_year_and_month(year, month, ={}) year_field = find_field([:from]) month_field = find(:id, year_field[:id].sub(/_1i$/, "_2i")) year_field.select(year) month_field.select(month) end |