blob: 8869ae0a8225af2fe4d06873621c347f726d75ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
declare(strict_types=1);
namespace Drupal\Tests;
use Behat\Mink\Selector\PartialNamedSelector;
/**
* Extends PartialNamedSelector to allow retrieval of hidden fields.
*
* @see \Behat\Mink\Selector\PartialNamedSelector
*/
class HiddenFieldSelector extends PartialNamedSelector {
/**
* {@inheritdoc}
*/
public function __construct() {
$xpath = ".//input[%lowercaseType% = 'hidden' and (%idOrNameMatch% or %valueMatch%)]";
$this->registerNamedXpath('hidden_field', $xpath);
parent::__construct();
}
}
|