title: Codeception acceptance test to accept popup
body: <p>I am currently using Codeception 2.2 in order to test an application. The steps I have so far are as below:</p>
  
  <pre><code>&lt;?php 
  $I = new AcceptanceTester($scenario);
  $I-&gt;wantTo('perform actions and see result');
  $I-&gt;amOnPage('/index.php');
  $I-&gt;fillField('username', 'admin');
  $I-&gt;fillField('password', 'password');
  $I-&gt;click('Sign in');
  $I-&gt;amOnPage('/index.php?module=CustomReports&amp;view=Edit');
  $I-&gt;fillField('relatedclient', '******');
  $I-&gt;fillField('policynumber', '****');
  $I-&gt;click('Save');
  $I-&gt;see('You are being redirected to the clients isa report.');
  $I-&gt;click('OK');    // This is where it fails
  $I-&gt;see('Client ISA Statement');
  ?&gt;
  </code></pre>
  
  <p>Currently I am using PHP with inline JS which is where the error happens. I am wondering how I can accept the window.alert in order to go to the next page. I have tried <code>$I-&gt;click('OK')</code> but that doesn't seem to work.</p>
  
  <p>Thanks</p>