title: Laravel functional testing ajax control
body: <p>In laravel 5.4, I can see that there are methods such as:</p>
  
  <pre><code>$browser-&gt;pause(1000);
  $browser-&gt;waitFor('.selector');
  $browser-&gt;waitForLink('Create');
  </code></pre>
  
  <p>But I don't see these in Laravel 5.3. </p>
  
  <p>We have two chained select boxes where second select box values are loaded through ajax based on selection from first select box. The problem is that when we run test, laravel doesn't wait for second selectbox/ajax to load which makes the test fail because it could not select any value from second select box.</p>
  
  <pre><code>$this-&gt;visit('/department');
  $this-&gt;select('1', 'country_id');
  $this-&gt;select('1', 'region_id'); // problem here
  // rest of code
  </code></pre>
  
  <p>I also tried using <code>sleep()</code> but it didn't work.</p>
  
  <p>Any idea of how to functional test such scenario in 5.3 please ? Thanks</p>