|
string | $alias |
|
string | $istextselector |
|
array | $xpaths |
| List of xpaths.
|
|
◆ __construct()
behat_component_named_selector::__construct |
( |
string |
$alias, |
|
|
array |
$xpaths, |
|
|
bool |
$istextselector = true |
|
) |
| |
Create the selector definition.
As an example, if you define new behat_component_named_selector('Message', [".//*[@data-conversation-id]//img[contains(@alt, %locator%)]/.."]) in get_partial_named_selectors in behat_message in message/tests/behat/behat_message.php, then steps like When "Group 1" "core_message > Message" should exist will work.
Text selectors are things that contain other things (e.g. some particular text), e.g. Then I can see "Some text" in the "Whatever" "text_selector" whereas non-text selectors are atomic things, like When I click the "Whatever" "widget".
- Parameters
-
string | $alias | The 'friendly' name of the thing. This will be prefixed with the component name. For example, if the mod_mymod plugin, says 'Thingy', then "mod_mymod > Thingy" becomes a selector. |
array | $xpaths | A list of xpaths one or more XPaths that the selector gets transformed into. |
bool | $istextselector | Whether this selector can also be used as a text selector. |
◆ get_alias()
behat_component_named_selector::get_alias |
( |
string |
$component | ) |
|
Get the alias of the selector.
This is the human-readable name that you would typically interact with.
- Parameters
-
- Return values
-
◆ get_combined_xpath()
behat_component_named_selector::get_combined_xpath |
( |
| ) |
|
Get the list of combined xpaths.
- Return values
-
string | The list of xpaths combined with the xpath | (OR) operator |
◆ get_name()
behat_component_named_selector::get_name |
( |
string |
$component | ) |
|
Get the name of the selector.
This is a back-end feature and contains a namespaced md5 of the human-readable name.
- Parameters
-
- Return values
-
◆ is_text_selector()
behat_component_named_selector::is_text_selector |
( |
| ) |
|
Whether this is a text selector.
- Return values
-
The documentation for this class was generated from the following file: