title: Cucumber.js, Protractor, Javascript example with Scenario Outlines
body: <p>I am learning how to cucumber.js, protractor, bdd etc.
  I can't find out how to use 'Scenario Outlines' in cucumber.js and protractor</p>
  
  <ol>
  <li>I have the following in my <strong>.feature file</strong></li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Scenario Outline : Invalid Login
    When I enter invalid &lt;user&gt;
    And I enter invalid &lt;pass&gt;
    And I press login button
    Then I should see an error message
  
    Examples:
      |user |pass|
      |abc  |def|
      |bcd  |efg|</code></pre>
  </div>
  </div>
  </p>
  
  <ol start="2">
  <li>I have the following code in my <strong>steps.js file</strong></li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>   
       this.When('I enter invalid username', function (callback) {
          var userNameElement = element(by.id('username'));
          userNameElement.sendKeys('userA');
          callback();
      });
  
      this.When('I enter invalid password', function (callback) {
          var passwordElement = element(by.id('password'));
          passwordElement.sendKeys('userB');
          callback();
  
      });</code></pre>
  </div>
  </div>
  </p>
  
  <ol start="3">
  <li>How can I pass the 'example' data from the 'feature' file to my 'steps' file and run the test with the data table define in the 'feature' file?  </li>
  </ol>