Files interactions with behat. Note that steps definitions files can not extend other steps definitions files, so steps definitions which makes use of file attachments or filepicker should use this behat_file_helper trait.
Copyright: | 2013 David MonllaĆ³ |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 271 lines (12 kb) |
Included or required: | 2 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/behat/behat_base.php |
get_filepicker_node($filepickerelement) X-Ref |
Gets the NodeElement for filepicker of filemanager moodleform element. The filepicker/filemanager element label is pointing to a hidden input which is not recognized as a named selector, as it is hidden... param: string $filepickerelement The filepicker form field label return: NodeElement The hidden element node. |
perform_on_element($action, ExpectationException $exception) X-Ref |
Performs $action on a filemanager container element (file or folder). It works together with open_element_contextual_menu as this method needs the contextual menu to be opened. param: string $action param: ExpectationException $exception return: void |
open_element_contextual_menu($name, $filemanagerelement = false) X-Ref |
Opens the contextual menu of a folder or a file. Works both in filemanager elements and when dealing with repository elements inside filepicker modal window. param: string $name The name of the folder/file param: string $filemanagerelement The filemanager form element locator, the repository items are in filepicker modal window if false return: void |
open_add_file_window($filemanagernode, $repositoryname) X-Ref |
Opens the filepicker modal window and selects the repository. param: NodeElement $filemanagernode The filemanager or filepicker form element DOM node. param: mixed $repositoryname The repo name. return: void |
wait_until_return_to_form() X-Ref |
Waits until the file manager modal windows are closed. This method is not used by any of our step definitions, keeping it here for users already using it. return: void |
wait_until_contents_are_updated($filepickernode) X-Ref |
Checks that the file manager contents are not being updated. This method is not used by any of our step definitions, keeping it here for users already using it. param: NodeElement $filepickernode The file manager DOM node return: void |