Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Moodle-specific selectors.

Copyright: 2013 David MonllaĆ³
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 121 lines (4 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 3 files
 lib/behat/classes/named_selector.php
 lib/behat/classes/partial_named_selector.php
 lib/behat/classes/exact_named_selector.php

Defines 1 class


Class: behat_selectors  - X-Ref

Moodle selectors manager.

get_behat_selector($selectortype, $element, Behat\Mink\Session $session)   X-Ref
Returns the behat selector and locator for a given moodle selector and locator

param: string $selectortype The moodle selector type, which includes moodle selectors
param: string $element The locator we look for in that kind of selector
param: Session $session The Mink opened session
return: array Contains the selector and the locator expected by Mink.

get_allowed_selectors()   X-Ref
Allowed selectors getter.

return: array

get_allowed_text_selectors()   X-Ref
Allowed text selectors getter.

return: array

normalise_named_selector(string $selector, string $locator)   X-Ref
Normalise the selector and locator for a named partial.

param: string $selector The selector name
param: string $locator The value to normalise
return: array

transform_find_for_field(behat_base $context, string $label, Element $container)   X-Ref
Transform the selector for a field.

param: string $label The label to find
param: Element $container The container to look within
return: array The selector, locator, and container to search within