title: Codeception acceptance tests run before browser starts
body: <p>When I run Codeception tests, sometimes on acceptance tests a browser starts too late, tests do not wait for it to start, and I get errors for tests that passed before a browser start:</p>
  
  <blockquote>
    <p>[ConnectionException] Can't connect to Webdriver at <a href="http://127.0.0.1:4444/wd/hub" rel="nofollow noreferrer">http://127.0.0.1:4444/wd/hub</a>. Please make sure that Selenium Server or PhantomJS is running.</p>
    
    <p>#1  Codeception\Subscriber\Module->before</p>
    
    <p>#2  D:\path\Yii\basic\vendor\symfony\event-dispatcher\EventDispatcher.php:212</p>
    
    <p>#3  D:\path\Yii\basic\vendor\symfony\event-dispatcher\EventDispatcher.php:44</p>
  </blockquote>
  
  <p>One time a browser didn't start at all.</p>
  
  <p>My command:</p>
  
  <pre><code>C:\Windows\System32\cmd.exe /K "cd /D D:\path\Yii\basic &amp;&amp; vendor\bin\codecept run"
  </code></pre>
  
  <p><strong>acceptance.suite.yml</strong>:</p>
  
  <pre><code>class_name: AcceptanceTester
  extensions:
      enabled:
          - Codeception\Extension\RunProcess:
              - java -jar -Dwebdriver.chrome.driver="D:/Selenium/chromedriver.exe" -Dwebdriver.gecko.driver="D:/Selenium/geckodriver.exe" "D:/Selenium/selenium-server-standalone-3.6.0.jar"
  modules:
      enabled:
          - WebDriver:
              url: https://hotel.localhost/
              browser: chrome
          - Yii2:
              part: orm
              entryScript: index-test.php
              cleanup: false
  </code></pre>
  
  <p><strong>codeception.yml</strong>:</p>
  
  <pre><code>actor: Tester
  paths:
      tests: tests
      log: tests/_output
      data: tests/_data
      helpers: tests/_support
  settings:
      bootstrap: _bootstrap.php
      memory_limit: 1024M
      colors: true
  modules:
      config:
          Yii2:
              configFile: 'config/test.php'
              cleanup: false
  
  coverage:
      enabled: true
      whitelist:
          include:
              - models/*
              - controllers/*
  </code></pre>
  
  <p>Thank you in advance.</p>