src/Concerns/InteractsWithElements.php
public function clickLink($link, $element = 'a')
    {
        $this->ensurejQueryIsAvailable();

        $selector = addslashes(trim($this->resolver->format("{$element}:contains({$link}):visible")));

        $this->driver->executeScript("jQuery.find(\"{$selector}\")[0].click();");

        return $this;
    }
public function clickLink($link, $element = 'a')
    {
        $this->ensurejQueryIsAvailable();

        $selector = addslashes(trim($this->resolver->format("{$element}:contains({$link}):visible")));

        $this->driver->executeScript("jQuery.find(\"{$selector}\")[0].click();");

        return $this;
    }
public function clickLink ( $ link , $ element = 'a' ) { $ this -> ensurejQueryIsAvailable ( ) ; $ selector = addslashes ( trim ( $ this -> resolver -> format ( "{$element}:contains({$link}):visible" ) ) ) ; $ this -> driver -> executeScript ( "jQuery.find(\"{$selector}\")[0].click();" ) ; return $ this ; }
Click the link with the given text.

@param  string  $link
@param  string  $element
@return $this
Click the link with the given text .