$('form').live 'submit', ->
  scenario = ["  scenario 'GENERATED' do"]
  scenario.push "    visit '#{window.location.pathname}'"
  $(this).find('input[type=text],input[type=email],input[type=url],input[type=number],input[type=search],textarea').each ->
    scenario.push "    fill_in '#{$(this).attr('id')}', :with => '#{$(this).val()}'"
  $(this).find('select').each ->
    scenario.push "    select '#{$(this).children(':selected').text()}', :from => '#{$(this).attr('id')}'"
  scenario.push "    click_button '#{$(this).find('input[type=submit]').val()}'"
  $(this).append '<textarea id="<%= HocusPocus::Recorder::SPEC %>" name="<%= HocusPocus::Recorder::SPEC %>" style="height: 0px; width: 0px;" />'
  $('#<%= HocusPocus::Recorder::SPEC %>').val(scenario.join('\n'))

$('form').live 'submit', ->
  scenario = ["  scenario 'GENERATED' do"]
  scenario.push "    visit '#{window.location.pathname}'"
  $(this).find('input[type=text],input[type=email],input[type=url],input[type=number],input[type=search],textarea').each ->
    scenario.push "    fill_in '#{$(this).attr('id')}', :with => '#{$(this).val()}'"
  $(this).find('select').each ->
    scenario.push "    select '#{$(this).val()}', :from => '#{$(this).attr('id')}'"
  scenario.push "    click_button '#{$(this).find('input[type=submit]').val()}'"
  $(this).append '<textarea id="<%= HocusPocus::Recorder::SPEC %>" name="<%= HocusPocus::Recorder::SPEC %>" style="height: 0px; width: 0px;" />'
  $('#<%= HocusPocus::Recorder::SPEC %>').val(scenario.join('\n'))

Revert "select from select by text"
Revert "select from select by text"

This reverts commit ed64b8a8fe027dd89b0b39c5f3edef0776e47c94.

reason: to revert "js.coffee"
