title: Protractor not finding h1 element
body: <p>I am creating my very first Cucumber test with protractor. When the browser starts up, and navigates to <code>/login</code>, it should find the <code>h1</code> tag and get the text. This doesn't seem to be working. Visually, the browser starts up and goes to the login page but it seems as if it closes before it even loads the component for that route. I am then given the following error:</p>
  <pre><code>1) Scenario: Login Page # e2e/src/features/login-page.feature:3
     ✔ Before # e2e/src/steps/login-page.steps.ts:9
     ✔ Given I am on the login page # e2e/src/steps/login-page.steps.ts:13
     ✖ Then I should see the login title # e2e/src/steps/login-page.steps.ts:17
         NoSuchElementError: No element found using locator: By(css selector, h1)
  </code></pre>
  <p>My feature looks like this:</p>
  <pre><code>Feature: Go to the login page
    @Regression
    Scenario: Login Page
      Given I am on the login page
      Then I should see the login title
  </code></pre>
  <p>and my steps look like this:</p>
  <pre><code>import { expect } from 'chai';
  import { Before, Given, Then } from 'cucumber';
  import { browser, by, element } from 'protractor';
  import { LoginPage } from '../pages/login-page.po';
  
  Given('I am on the login page', async () =&gt; {
    await browser.get('/login');
  });
  
  Then('I should see the login title', async () =&gt; {
    expect(await element(by.css('h1')).getText()).to.equal('Login');
  });
  </code></pre>