def select_date(date_to_select, options ={})
      date = date_to_select.is_a?(Date) || date_to_select.is_a?(Time) ?
                date_to_select : Date.parse(date_to_select)

      id_prefix = locate_id_prefix(options) do
        year_field = FieldByIdLocator.new(@session, dom, /(.*?)_#{DATE_TIME_SUFFIXES[:year]}$/).locate
        raise NotFoundError.new("No date fields were found") unless year_field && year_field.id =~ /(.*?)_1i/
        $1
      end

      select date.year, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:year]}"
      select date.strftime('%B'), :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:month]}"
      select date.day, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:day]}"
    end
def select_date(date_to_select, options ={})
      date = date_to_select.is_a?(Date) || date_to_select.is_a?(Time) ?
                date_to_select : Date.parse(date_to_select)

      id_prefix = locate_id_prefix(options) do
        year_field = FieldByIdLocator.new(@session, dom, /(.*?)_#{DATE_TIME_SUFFIXES[:year]}$/).locate
        raise NotFoundError.new("No date fields were found") unless year_field && year_field.id =~ /(.*?)_1i/
        $1
      end

      select date.year, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:year]}"
      select date.strftime('%B'), :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:month]}"
      select date.day, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:day]}"
    end
Verifies that date elements (year, month, day) exist on the current page
 with the specified values. You can optionally restrict the search to a specific
 date's elements by assigning <tt>options[:from]</tt> the value of the date's
 label. Selects all the date elements with date provided.  The date provided may
 be a string or a Date/Time object.

 Rail's convention is used for detecting the date elements. All elements
 are assumed to have a shared prefix.  You may also specify the prefix
 by assigning <tt>options[:id_prefix]</tt>.

 Examples:
   select_date "January 23, 2004"
   select_date "April 26, 1982", :from => "Birthday"
   select_date Date.parse("December 25, 2000"), :from => "Event"
   select_date "April 26, 1982", :id_prefix => 'birthday'