library/MinkWrapper.php
protected function _getElementByLink($sSelector)
    {
        $sSelector = str_replace('link=', '', $sSelector);

        $sParsedSelector = $this->getMinkSession()->getSelectorsHandler()->xpathLiteral($sSelector);
        $oElements = $this->getMinkSession()->getPage()->findAll('named', array('link', $sParsedSelector));

        if (empty($oElements)) {
            $aSelectorParts = explode(' ', $sSelector);
            $aSelectorParts = array_map(array($this->getMinkSession()->getSelectorsHandler(), 'xpathLiteral'),
                $aSelectorParts);
            $sFormedSelector = "//a[contains(.," . implode(") and contains(.,", $aSelectorParts) . ")]";
            $oElements = $this->getMinkSession()->getPage()->findAll('xpath', $sFormedSelector);
        }

        return $this->_getExactMatch($oElements, $sSelector);
    }
protected function _getElementByLink($sSelector)
    {
        $sSelector = str_replace('link=', '', $sSelector);

        $sParsedSelector = $this->getMinkSession()->getSelectorsHandler()->xpathLiteral($sSelector);
        $oElements = $this->getMinkSession()->getPage()->findAll('named', array('link', $sParsedSelector));

        if (empty($oElements)) {
            $aSelectorParts = explode(' ', $sSelector);
            $aSelectorParts = array_map(array($this->getMinkSession()->getSelectorsHandler(), 'xpathLiteral'),
                $aSelectorParts);
            $sFormedSelector = "//a[contains(.," . implode(") and contains(.,", $aSelectorParts) . ")]";
            $oElements = $this->getMinkSession()->getPage()->findAll('xpath', $sFormedSelector);
        }

        return $this->_getExactMatch($oElements, $sSelector);
    }
protected function _getElementByLink ( $ sSelector ) { $ sSelector = str_replace ( 'link=' , '' , $ sSelector ) ; $ sParsedSelector = $ this -> getMinkSession ( ) -> getSelectorsHandler ( ) -> xpathLiteral ( $ sSelector ) ; $ oElements = $ this -> getMinkSession ( ) -> getPage ( ) -> findAll ( 'named' , array ( 'link' , $ sParsedSelector ) ) ; if ( empty ( $ oElements ) ) { $ aSelectorParts = explode ( ' ' , $ sSelector ) ; $ aSelectorParts = array_map ( array ( $ this -> getMinkSession ( ) -> getSelectorsHandler ( ) , 'xpathLiteral' ) , $ aSelectorParts ) ; $ sFormedSelector = "//a[contains(.," . implode ( ") and contains(.," , $ aSelectorParts ) . ")]" ; $ oElements = $ this -> getMinkSession ( ) -> getPage ( ) -> findAll ( 'xpath' , $ sFormedSelector ) ; } return $ this -> _getExactMatch ( $ oElements , $ sSelector ) ; }
Returns element by given link

@param string $sSelector

@return mixed
Returns element by given link