title: Cucumber scenario outline and examples with generic step definitions
body: <p>I have a Feature file which is as below:</p>
  
  <pre><code>Scenario Outline: Create ABC
  
    Given I open the application
  
    When I enter username as &lt;username&gt;
  
    And I enter password as &lt;password&gt;
  
    Then I enter title as &lt;title&gt;
  
    And press submit
  
  
  Examples:
  
  | username | password | title |
  
  | Rob      | xyz1      | title1 |
  
  | Bob      | xyz1      | title2 |
  </code></pre>
  
  <p>This mandates me to have step definitions for each of these values. Can i instead have a </p>
  
  <p>generic step definition that can be mapped for every username or password or title values in </p>
  
  <p>the examples section.</p>
  
  <p>i.e instead of saying </p>
  
  <pre><code>@When("^I enter username as Rob$")
  public void I_enter_username_as_Rob() throws Throwable {
      // Express the Regexp above with the code you wish you had
      throw new PendingException();
  }
  </code></pre>
  
  <p>can i enter</p>
  
  <pre><code>@When("^I enter username as &lt;username&gt;$")
  public void I_enter_username_as_username(&lt;something to use the value passed&gt;) throws Throwable {
      // Express the Regexp above with the code you wish you had
      throw new PendingException();
  }
  </code></pre>