Why use Selenium with Laravel for testing?
<p>Both Laravel and Selenium use PHPUnit's assertions.
In both Laravel and Selenium you write code to make tests (instead of choosing things to do in GUI; e.g. <code>open: google.com</code>, <code>write in: name-&gt;queryInput text:"test search"</code>, <code>click: name-&gt;searchButton</code>).
Both Laravel and Selenium are able to visit webpages, submit forms and check the results. You can automate tests both in Laravel and Selenium by adding PHPUnit command to cron.</p>

<p>So <strong>why should I use Selenium for testing in Laravel</strong>?</p>

<p>The only thing I could think of is that Selenium allows you to choose a browser in which the pages will be opened. So if your test passes using only Laravel testing it may fail for some browsers, like, say, Internet Explorer.</p>

<p>In <a href="https://laracasts.com/series/whatcha-working-on/episodes/1" rel="noreferrer">this Laracast</a> the author says at 1:00:</p>

<blockquote>
  <p>One problem with that [testing in Laravel] is, it doesn't include JavaScript support. So instead, we're faking the request, we're getting the response, we're inspecting it but no browser or JavaScript engine is involved in that process.</p>
</blockquote>

<p>But what are the cons of faking the requests? How would Selenium help? An example would be perfect.</p>