Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PartialNamedSelector.php

class PartialNamedSelector

Named selectors engine. Uses registered XPath selectors to create new expressions.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

  • class \Behat\Mink\Selector\NamedSelector implements \Behat\Mink\Selector\SelectorInterface
    • class \Behat\Mink\Selector\PartialNamedSelector extends \Behat\Mink\Selector\NamedSelector

Expanded class hierarchy of PartialNamedSelector

File

vendor/behat/mink/src/Selector/PartialNamedSelector.php, line 18

Namespace

Behat\Mink\Selector
View source
class PartialNamedSelector extends NamedSelector {
    public function __construct() {
        $this->registerReplacement('%tagTextMatch%', 'contains(normalize-space(string(.)), %locator%)');
        $this->registerReplacement('%valueMatch%', 'contains(./@value, %locator%)');
        $this->registerReplacement('%titleMatch%', 'contains(./@title, %locator%)');
        $this->registerReplacement('%altMatch%', 'contains(./@alt, %locator%)');
        $this->registerReplacement('%relMatch%', 'contains(./@rel, %locator%)');
        $this->registerReplacement('%labelAttributeMatch%', 'contains(./@label, %locator%)');
        parent::__construct();
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
NamedSelector::$replacements private property
NamedSelector::$selectors private property
NamedSelector::$xpathEscaper private property
NamedSelector::escapeLocator private function
NamedSelector::registerNamedXpath public function Registers new XPath selector with specified name.
NamedSelector::registerReplacement public function Register a string replacement used to reduce duplication and increase readability in a Named XPath selector.
NamedSelector::translateToXPath public function Translates provided locator into XPath. Overrides SelectorInterface::translateToXPath
PartialNamedSelector::__construct public function Creates selector instance. Overrides NamedSelector::__construct

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal