Laravel Dusk screenshot
问题 I'm using laravel 5.6 and Dusk for running some tests. I'm always taking my screenshot like this ... use Facebook\WebDriver\WebDriverDimension; ... class LoginTest extends DuskTestCase { public function testLogin() { $user = User::first(); $this->browse(function ($browser) use ( $user ) { $test = $browser->visit( new Login) ->resize(1920,1080) ... ->driver->takeScreenshot(base_path('tests/Browser/screenshots/testLogin.png')); }); } } But as my tests will be more and more used, I don't want to