__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Steps definitions to open and close action menus.
 *
 * @package    core
 * @category   test
 * @copyright  2016 Damyon Wiese
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.

require_once(__DIR__ . '/../../behat/behat_base.php');

use Behat\Mink\Element\NodeElement;
use Behat\Mink\Exception\DriverException;

/**
 * Steps definitions to open and close action menus.
 *
 * @package    core
 * @category   test
 * @copyright  2016 Damyon Wiese
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class behat_action_menu extends behat_base {

    /**
     * Open the action menu in
     *
     * @Given /^I open the action menu in "(?P<element_string>(?:[^"]|\\")*)" "(?P<selector_string>[^"]*)"$/
     * @param string $element
     * @param string $selector
     * @return void
     */
    public function i_open_the_action_menu_in($element, $selectortype) {
        // Gets the node based on the requested selector type and locator.
        $node = $this->get_node_in_container(
            "css_element",
            "[role=button][aria-haspopup=true],button[aria-haspopup=true],[role=menuitem][aria-haspopup=true]",
            $selectortype,
            $element
        );

        // Check if it is not already opened.
        if ($node->getAttribute('aria-expanded') === 'true') {
            return;
        }

        $node->click();
    }

    /**
     * When an action menu is open, follow one of the items in it.
     *
     * The > is used to indicate a sub-menu. For example "Group mode > Visible groups"
     * will do two clicks, one on the Group mode menu item, and one on the Visible groups link
     * in the sub-menu.
     *
     * @Given /^I choose "(?P<link_string>(?:[^"]|\\")*)" in the open action menu$/
     * @param string $linkstring
     * @return void
     */
    public function i_choose_in_the_open_action_menu($menuitemstring) {
        if (!$this->running_javascript()) {
            throw new DriverException('Action menu steps are not available with Javascript disabled');
        }
        // Check for sub-menus.
        $menuitems = explode('>', $menuitemstring);
        foreach ($menuitems as $menuitem) {
            // Gets the node based on the requested selector type and locator.
            $menuselector = ".moodle-actionmenu .dropdown.show .dropdown-menu";
            $node = $this->get_node_in_container("link", trim($menuitem), "css_element", $menuselector);
            $node->click();
        }

    }

    /**
     * Select a specific item in an action menu.
     *
     * @When /^I choose the "(?P<item_string>(?:[^"]|\\")*)" item in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu$/
     * @param string $item The item to choose
     * @param string $actionmenu The text used in the description of the action menu
     */
    public function i_choose_in_the_named_menu(string $item, string $actionmenu): void {
        $menu = $this->find('actionmenu', $actionmenu);
        $this->select_item_in_action_menu($item, $menu);
    }

    /**
     * Select a specific item in an action menu within a container.
     *
     * @When /^I choose the "(?P<item_string>(?:[^"]|\\")*)" item in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu of the "(?P<locator_string>(?:[^"]|\\")*)" "(?P<type_string>(?:[^"]|\\")*)"$/
     * @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
     */
    public function i_choose_in_the_named_menu_in_container(string $item, string $actionmenu, $locator, $selector): void {
        $container = $this->find($selector, $locator);
        $menu = $this->find('actionmenu', $actionmenu, false, $container);
        $this->select_item_in_action_menu($item, $menu);
    }

    /**
     * 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
     */
    protected function select_item_in_action_menu(string $item, NodeElement $menu): void {
        if ($this->running_javascript()) {
            // Open the menu by clicking on the trigger.
            $this->execute(
                'behat_general::i_click_on_in_the',
                ['a.dropdown-toggle', 'css_element', $menu, "NodeElement"]
            );
        }

        // Select the menu item.
        $this->execute(
            'behat_general::i_click_on_in_the',
            [$item, "link", $menu, "NodeElement"]
        );
    }

    /**
     * The action menu item should not exist.
     *
     * @Then /^the "(?P<item_string>(?:[^"]|\\")*)" item should not exist in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu$/
     * @param string $item The item to check
     * @param string $actionmenu The text used in the description of the action menu
     */
    public function item_should_not_exist(string $item, string $actionmenu): void {
        $menu = $this->find('actionmenu', $actionmenu);
        $this->execute('behat_general::should_not_exist_in_the', [
            $item, 'link',
            $menu, 'NodeElement'
        ]);
    }

    /**
     * The action menu item should not exist within a container.
     *
     * @Then /^the "(?P<item_string>(?:[^"]|\\")*)" item should not exist in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu of the "(?P<locator_string>(?:[^"]|\\")*)" "(?P<type_string>(?:[^"]|\\")*)"$/
     * @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
     */
    public function item_should_not_exist_in_the(string $item, string $actionmenu, $locator, $selector): void {
        $container = $this->find($selector, $locator);
        $menu = $this->find('actionmenu', $actionmenu, false, $container);
        $this->execute('behat_general::should_not_exist_in_the', [
            $item, 'link',
            $menu, 'NodeElement'
        ]);
    }


    /**
     * The action menu item should exist.
     *
     * @Then /^the "(?P<item_string>(?:[^"]|\\")*)" item should exist in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu$/
     * @param string $item The item to check
     * @param string $actionmenu The text used in the description of the action menu
     */
    public function item_should_exist(string $item, string $actionmenu): void {
        $menu = $this->find('actionmenu', $actionmenu);
        $this->execute('behat_general::should_exist_in_the', [
            $item, 'link',
            $menu, 'NodeElement'
        ]);
    }

    /**
     * The action menu item should exist within a container.
     *
     * @Then /^the "(?P<item_string>(?:[^"]|\\")*)" item should exist in the "(?P<actionmenu_string>(?:[^"]|\\")*)" action menu of the "(?P<locator_string>(?:[^"]|\\")*)" "(?P<type_string>(?:[^"]|\\")*)"$/
     * @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
     */
    public function item_should_exist_in_the(string $item, string $actionmenu, $locator, $selector): void {
        $container = $this->find($selector, $locator);
        $menu = $this->find('actionmenu', $actionmenu, false, $container);
        $this->execute('behat_general::should_exist_in_the', [
            $item, 'link',
            $menu, 'NodeElement'
        ]);
    }
}

Filemanager

Name Type Size Permission Actions
fixtures Folder 0777
action_menu.feature File 1.11 KB 0777
action_menu_subpanel.feature File 14.23 KB 0777
action_modal.feature File 2.06 KB 0777
alpha_chooser.feature File 22.13 KB 0777
behat_accessibility.php File 7.8 KB 0777
behat_action_menu.php File 8.45 KB 0777
behat_data_generators.php File 10.55 KB 0777
behat_deprecated.php File 1.41 KB 0777
behat_download.php File 8.42 KB 0777
behat_filters.php File 2.95 KB 0777
behat_forms.php File 33.96 KB 0777
behat_general.php File 115.55 KB 0777
behat_hooks.php File 33.02 KB 0777
behat_moodlenet.php File 2.03 KB 0777
behat_navigation.php File 72.67 KB 0777
behat_permissions.php File 12.62 KB 0777
behat_transformations.php File 7.17 KB 0777
datetime_any.feature File 4.24 KB 0777
dropdown_output.feature File 11.15 KB 0777
enabledashboard.feature File 846 B 0777
expand_single_fieldset.feature File 697 B 0777
largeforms.feature File 2.67 KB 0777
locking.feature File 8.55 KB 0777
menu_navigation_single_activity.feature File 4.04 KB 0777
menu_navigation_topics.feature File 4.38 KB 0777
min_max_version.feature File 1018 B 0777
modal_focus.feature File 1.36 KB 0777
moodlenet_outbound.feature File 5.62 KB 0777
moodlenet_share_course.feature File 3.64 KB 0777
moodlenet_share_partial_course.feature File 5.45 KB 0777
permissionmanager.feature File 3.62 KB 0777
profile_pic_access.feature File 3.32 KB 0777
readonlyform.feature File 1.14 KB 0777
securelayout.feature File 1.96 KB 0777
showuseridentity.feature File 4.26 KB 0777
switch_editing_mode.feature File 2.67 KB 0777
timezone.feature File 431 B 0777
userfeedback.feature File 2.18 KB 0777
Filemanager