Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is 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/partial_named_selector.php
 lib/behat/classes/exact_named_selector.php
 lib/behat/classes/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