Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 403]

Steps definitions to open and close action menus.

Copyright: 2016 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 204 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/behat/behat_base.php

Defines 1 class


Class: behat_action_menu  - X-Ref

Steps definitions to open and close action menus.

i_open_the_action_menu_in($element, $selectortype)   X-Ref
Open the action menu in

param: string $element
param: string $selector
return: void

i_choose_in_the_open_action_menu($menuitemstring)   X-Ref
When an action menu is open, follow one of the items in it.

param: string $linkstring
return: void

i_choose_in_the_named_menu(string $item, string $actionmenu)   X-Ref
Select a specific item in an action menu.

param: string $item The item to choose
param: string $actionmenu The text used in the description of the action menu

i_choose_in_the_named_menu_in_container(string $item, string $actionmenu, $locator, $selector)   X-Ref
Select a specific item in an action menu within a container.

param: string $item The item to choose
param: string $actionmenu The text used in the description of the action menu
param: string|NodeElement $locator The identifer used for the container
param: string $selector The type of container to locate

select_item_in_action_menu(string $item, NodeElement $menu)   X-Ref
Select an item in the specified menu.

Note: This step does work both with, and without, JavaScript.

param: string $item Item string value
param: NodeElement $menu The menu NodeElement to select from

item_should_not_exist(string $item, string $actionmenu)   X-Ref
The action menu item should not exist.

param: string $item The item to check
param: string $actionmenu The text used in the description of the action menu

item_should_not_exist_in_the(string $item, string $actionmenu, $locator, $selector)   X-Ref
The action menu item should not exist within a container.

param: string $item The item to check
param: string $actionmenu The text used in the description of the action menu
param: string|NodeElement $locator The identifer used for the container
param: string $selector The type of container to locate

item_should_exist(string $item, string $actionmenu)   X-Ref
The action menu item should exist.

param: string $item The item to check
param: string $actionmenu The text used in the description of the action menu

item_should_exist_in_the(string $item, string $actionmenu, $locator, $selector)   X-Ref
The action menu item should exist within a container.

param: string $item The item to check
param: string $actionmenu The text used in the description of the action menu
param: string|NodeElement $locator The identifer used for the container
param: string $selector The type of container to locate