title: Cannot read property 'equal' of undefined
body: <p>I'm using protractor to test my app.</p>
  
  <p>I'm trying to get the value inside a tag <code>&lt;p&gt;</code> and I can do this as shown by <code>console.log</code>, but the expected returns an error:</p>
  
  <pre><code>[14:54:57] E/launcher - Cannot read property 'equal' of undefined
  [14:54:57] E/launcher - TypeError: Cannot read property 'equal' of undefined
  </code></pre>
  
  <p>This is my code on <code>stepdefinitions.js</code>:</p>
  
  <pre><code>Then('I see the alert "Values are incorrect" for the contents which does not match the proper data', function (next) {
      browser.sleep(9999);
      let failed_msg = element(by.css('.error-message'));
      failed_msg.getText().then(function(text){
          console.log('MY ALERT MESSAGE FOR THIS SCENARIO IS: ',text);
          expect((failed_msg).to.equal("Values are incorrect"));   
          next();
      });
  });
  </code></pre>
  
  <p>Can someone help me?</p>