title: Cucumber Scenario Outline with data tables - Capybara element not found
body: <p>How do I write a scenario outline to test a calculation based on one variable which outputs 10 different variables?</p>
  
  <p>I've tried various options and getting various errors including:</p>
  
  <pre><code>Unable to find option "&lt;frequency&gt;" (Capybara::ElementNotFound)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>(Cucumber::ArityMismatchError)
  </code></pre>
  
  <p>The code below gives the Capybara::ElementNotFound error</p>
  
  <pre><code>Scenario Outline:
    When  I select "&lt;frequency&gt;" frequency
    And   I press recalculate
    Then  I should see total amount and percentages recalculated by &lt;frequency&gt; frequency on the results page
  
  Examples:
    | frequency |
    | weekly    |
    | daily     |
  
  Examples:
    | tax   | sub-total | total  |
    | 38.25 | 114.74    | 191.24 |
    | 3.19  | 9.56      | 15.94  |
  </code></pre>
  
  <p>Step definitions</p>
  
  <pre><code>When(/^I select "([^"]*)" frequency$/) do |frequency|
    select "&lt;frequency&gt;", from: "frequency"
  end
  
  Then(/^I should see total amount and percentages recalculated by &lt;frequency&gt; frequency on the results page$/) do |table|
    expect(results_page).to have_content("&lt;tax&gt;")
    expect(results_page).to have_content("&lt;sub_total&gt;")
    expect(results_page).to have_content("&lt;total&gt;")
  end
  </code></pre>
  
  <p>form markup</p>
  
  <pre><code>&lt;form action="change_result_frequency" method="post"&gt;
    &lt;label for="frequency"&gt;Frequency&lt;/label&gt;
    &lt;select name="frequency" id="frequency"&gt;
      &lt;option value="yearly"&gt;yearly&lt;/option&gt;
      &lt;option value="monthly"&gt;monthly&lt;/option&gt;
      &lt;option selected="selected" value="weekly"&gt;weekly&lt;/option&gt;
      &lt;option value="daily"&gt;daily&lt;/option&gt;
    &lt;/select&gt;
    &lt;input type="submit" name="commit" value="Recalculate"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am new to cucumber and capybara so I'm unsure how to write scenario outlines with data tables. What am I doing wrong?</p>