library/MinkWrapper.php
protected function _getElementByIdOrName($sSelector)
    {
        $sSelector = str_replace(array('name=', 'id='), array('', ''), $sSelector);

        if (strpos($sSelector, '.') || strpos($sSelector, '[')) {
            $oElement = $this->_getElementByIdOrNameXpath($sSelector);
        } else {
            $oElement = $this->_getElementByIdOrNameCSS($sSelector);
        }

        return $oElement;
    }
protected function _getElementByIdOrName($sSelector)
    {
        $sSelector = str_replace(array('name=', 'id='), array('', ''), $sSelector);

        if (strpos($sSelector, '.') || strpos($sSelector, '[')) {
            $oElement = $this->_getElementByIdOrNameXpath($sSelector);
        } else {
            $oElement = $this->_getElementByIdOrNameCSS($sSelector);
        }

        return $oElement;
    }
protected function _getElementByIdOrName ( $ sSelector ) { $ sSelector = str_replace ( array ( 'name=' , 'id=' ) , array ( '' , '' ) , $ sSelector ) ; if ( strpos ( $ sSelector , '.' ) || strpos ( $ sSelector , '[' ) ) { $ oElement = $ this -> _getElementByIdOrNameXpath ( $ sSelector ) ; } else { $ oElement = $ this -> _getElementByIdOrNameCSS ( $ sSelector ) ; } return $ oElement ; }
Returns element by given id or name

@param string $sSelector

@return NodeElement|null
Returns element by given id or name