title: Moving Protractor tests to async/await (leaving selenium control flow)
body: <p>I want to move appart from the selenium control flow in my Protractor tests.</p>
  
  <p>Here are the steps and problems I went through so far:</p>
  
  <p><strong>1. Disable it test by test</strong></p>
  
  <p>My first idea was to use <code>SELENIUM_PROMISE_MANAGER</code> in order to move from selenium promises to async/await code.</p>
  
  <p>Unfortunately, I found no way to put one test to <code>SELENIUM_PROMISE_MANAGER=0</code> while keeping others to <code>SELENIUM_PROMISE_MANAGER=1</code> in order to do the migration smoothly.</p>
  
  <p><strong>2. Keep it but use async/await too</strong></p>
  
  <p>So I thought about a code using async/await while keeping <code>SELENIUM_PROMISE_MANAGER=1</code>.</p>
  
  <p>Unfortunately it seems not to be compatible: <a href="https://github.com/angular/protractor/tree/master/exampleTypescript/asyncAwait" rel="nofollow noreferrer">https://github.com/angular/protractor/tree/master/exampleTypescript/asyncAwait</a></p>
  
  <p>There is nothing about such issue on Selenium side so I am wondering if this is an advice or a real <em>it always fails</em>.</p>
  
  <p><strong>3. Override promise.USE_PROMISE_MANAGER</strong></p>
  
  <p>Using <code>protractor.promise.USE_PROMISE_MANAGER=false</code> does not work for me (in beforeEach).</p>
  
  <p><strong>4. Call the control flow on async code</strong></p>
  
  <p><code>protractor.promise.controlFlow().execute(/* my async code*/);</code></p>
  
  <p>For me it seems to mix async/await to control flow...</p>
  
  <p><strong>What is the right strategy?</strong></p>
  
  <p>I am wondering, what is the right strategy to move to async/await in Protractor tests?</p>
  
  <p><em>I don't want to put everything in async/await in one change but to spread the change in multiple small changes</em></p>