Laravel - Browser Tests - Clicking Links

To click a link, you may use the clickLink method on the browser instance. The clickLink method will click the link that has the given display text:


You may use the seeLink method to determine if a link with the given display text is visible on the page:

    if ($browser->seeLink($linkText)) {
        // ...
These methods interact with jQuery. If jQuery is not available on the page, Dusk will automatically inject it into the page so it is available for the test's duration.