How Laravel Dusk accesses browser error Log
This article will explain in detail how Laravel Dusk accesses the browser error log. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Access browser error log
There's nothing wrong with this, just some interesting things I found. We can access the browser console log by calling $browser- > driver- > manage ()-> getLog ('browser').
This returns a series of logs in the browser's console. For example, it can be useful for tests that do not have javascript errors on the page.
Testpublic function no_browser_errors () {$this- > browse (function ($browser) {$this- > assertEmpty ($browser- > driver- > manage ()-> getLog ('browser'));});}
Note, however, that it does not contain the output of the console.log call
This is the end of the article on "how Laravel Dusk accesses browser error logs". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.