Laravel - Browser Tests - Resizing Browser Windows

You may use the resize method to adjust the size of the browser window:

    
    $browser->resize(1920, 1080);
	

The maximize method may be used to maximize the browser window:

    
    $browser->maximize();
	

The fitContent method will resize the browser window to match the size of its content:

    
    $browser->fitContent();
	

When a test fails, Dusk will automatically resize the browser to fit the content prior to taking a screenshot. You may disable this feature by calling the disableFitOnFailure method within your test:

    
    $browser->disableFitOnFailure();
	

You may use the move method to move the browser window to a different position on your screen:

    
    $browser->move($x = 100, $y = 100);