Laravel - Browser Tests - Clicking On Elements

The click method may be used to click on an element matching the given CSS or Dusk selector:

    
    $browser->click('.selector');
	

The clickAtXPath method may be used to click on an element matching the given XPath expression:

    
    $browser->clickAtXPath('//div[@class = "selector"]');
	

The clickAtPoint method may be used to click on the topmost element at a given pair of coordinates relative to the viewable area of the browser:

    
    $browser->clickAtPoint($x = 0, $y = 0);
	

The doubleClick method may be used to simulate the double click of a mouse:

    
    $browser->doubleClick();
	

The rightClick method may be used to simulate the right click of a mouse:

    
    $browser->rightClick();
    
    $browser->rightClick('.selector');
	

The clickAndHold method may be used to simulate a mouse button being clicked and held down. A subsequent call to the releaseMouse method will undo this behavior and release the mouse button:

    
    $browser->clickAndHold()
            ->pause(1000)
            ->releaseMouse();