4 * This file is part of the Mink package.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Mink\Selector;
14 * Exact match selector engine. Like the Named selector engine but ignores partial matches.
16 class ExactNamedSelector extends NamedSelector
18 public function __construct()
20 $this->registerReplacement('%tagTextMatch%', 'normalize-space(string(.)) = %locator%');
21 $this->registerReplacement('%valueMatch%', './@value = %locator%');
22 $this->registerReplacement('%titleMatch%', './@title = %locator%');
23 $this->registerReplacement('%altMatch%', './@alt = %locator%');
24 $this->registerReplacement('%relMatch%', './@rel = %locator%');
25 $this->registerReplacement('%labelAttributeMatch%', './@label = %locator%');
27 parent::__construct();