 
     return retval
 
+  @::__defineGetter__ 'elements', ->
+    @constructor.elements
+
+  @::__defineGetter__ 'e', ->
+    @elements
+
   resume: (answers) ->
     if type.isArray answers
       for {key, value} in answers

          @onDownloadSuccessful browser, page


  #
  # Answers whatever security questions are on the page by
  # using the xpaths given in e.security.
  #
  # NOTE: Called with magic scope!
  #
  answerSecurityQuestions: ->

    # these are here because this function is called with magic scope
    # and therefore won't see the variables we defined above
    {trim} = require 'lang/string'
    privacy = require 'util/privacy'

    questions = page.select e.security.questions
    qanswers  = page.select e.security.answers

    if questions.length isnt qanswers.length
      logger.error "Found ", questions.length, " security questions, but ",

  # @public
  #
  fillDateRange: ->
    @fillDateRangeWithoutMagicScope @browser, @page

  # Internal: Fills out the date form fields for a download.
  fillDateRangeWithoutMagicScope: (browser, page) ->
    formatString = @elements.download.date.format or 'MM/dd/yyyy'

    opts   = @elements.download.date
    fromEl = privacy.untaint page.find(opts.from)
    toEl   = privacy.untaint page.find(opts.to)

