original_string: protected function get_filepicker_node($filepickerelement) {
  
          // More info about the problem (in case there is a problem).
          $exception = new ExpectationException('"' . $filepickerelement . '" filepicker can not be found', $this->getSession());
  
          // If no file picker label is mentioned take the first file picker from the page.
          if (empty($filepickerelement)) {
              $filepickercontainer = $this->find(
                      'xpath',
                      "//*[@data-fieldtype=\"filemanager\"]",
                      $exception
              );
          } else {
              // Gets the ffilemanager node specified by the locator which contains the filepicker container.
              $filepickerelement = behat_context_helper::escape($filepickerelement);
              $filepickercontainer = $this->find(
                      'xpath',
                      "//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" .
                      "//ancestor::*[@data-fieldtype = 'filemanager' or @data-fieldtype = 'filepicker']",
                      $exception
              );
          }
  
          return $filepickercontainer;
      }
code: protected function get_filepicker_node($filepickerelement) {
  
          // More info about the problem (in case there is a problem).
          $exception = new ExpectationException('"' . $filepickerelement . '" filepicker can not be found', $this->getSession());
  
          // If no file picker label is mentioned take the first file picker from the page.
          if (empty($filepickerelement)) {
              $filepickercontainer = $this->find(
                      'xpath',
                      "//*[@data-fieldtype=\"filemanager\"]",
                      $exception
              );
          } else {
              // Gets the ffilemanager node specified by the locator which contains the filepicker container.
              $filepickerelement = behat_context_helper::escape($filepickerelement);
              $filepickercontainer = $this->find(
                      'xpath',
                      "//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" .
                      "//ancestor::*[@data-fieldtype = 'filemanager' or @data-fieldtype = 'filepicker']",
                      $exception
              );
          }
  
          return $filepickercontainer;
      }
code_tokens: protected function get_filepicker_node ( $ filepickerelement ) { // More info about the problem (in case there is a problem). $ exception = new ExpectationException ( '"' . $ filepickerelement . '" filepicker can not be found' , $ this -> getSession ( ) ) ; // If no file picker label is mentioned take the first file picker from the page. if ( empty ( $ filepickerelement ) ) { $ filepickercontainer = $ this -> find ( 'xpath' , "//*[@data-fieldtype=\"filemanager\"]" , $ exception ) ; } else { // Gets the ffilemanager node specified by the locator which contains the filepicker container. $ filepickerelement = behat_context_helper :: escape ( $ filepickerelement ) ; $ filepickercontainer = $ this -> find ( 'xpath' , "//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" . "//ancestor::*[@data-fieldtype = 'filemanager' or @data-fieldtype = 'filepicker']" , $ exception ) ; } return $ filepickercontainer ; }
docstring: 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...
  
  @throws ExpectationException Thrown by behat_base::find
  @param string $filepickerelement The filepicker form field label
  @return NodeElement The hidden element node.
docstring_tokens: Gets the NodeElement for filepicker of filemanager moodleform element .