Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Behat\Mink\Selector; Chris@0: Chris@0: /** Chris@0: * Named selectors engine. Uses registered XPath selectors to create new expressions. Chris@0: * Chris@0: * @author Konstantin Kudryashov Chris@0: */ Chris@0: class PartialNamedSelector extends NamedSelector Chris@0: { Chris@0: public function __construct() Chris@0: { Chris@0: $this->registerReplacement('%tagTextMatch%', 'contains(normalize-space(string(.)), %locator%)'); Chris@0: $this->registerReplacement('%valueMatch%', 'contains(./@value, %locator%)'); Chris@0: $this->registerReplacement('%titleMatch%', 'contains(./@title, %locator%)'); Chris@0: $this->registerReplacement('%altMatch%', 'contains(./@alt, %locator%)'); Chris@0: $this->registerReplacement('%relMatch%', 'contains(./@rel, %locator%)'); Chris@0: $this->registerReplacement('%labelAttributeMatch%', 'contains(./@label, %locator%)'); Chris@0: Chris@0: parent::__construct(); Chris@0: } Chris@0: }