Get the App
SLTechnology News&Howtos  ›  Development  › 

How Laravel Dusk accesses browser error Log

Shulou Source: shulou.com Published: 2022-06-01 04:35:24 10月04日 Update

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.

Tags: Logs browsers browsing errors articles console more controls good practical interesting nothing things content just can pass articles useful knowledge questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Docker Linux MySQL Shulou Information