Top Level Namespace
Defined Under Namespace
Modules: Cucumber, Resolvers, TimecopHarness
Instance Method Summary collapse
Instance Method Details
#select_year_month(year:, month:, day: nil, field:) ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/cucumber/sammies/step_definitions/form_steps.rb', line 40 def select_year_month(year:, month:, day: nil, field:) unless field.include?('_') field = find(:xpath, ".//label[contains(.,'#{field}')]")[:for] field.gsub!(/_[1-3]{1}i$/, '') end select year, :from => "#{field}_1i" select month, :from => "#{field}_2i" select day, :from => "#{field}_3i" if day end |