/** * Sets the field value. * * @param string $value * @return void */ public function set_value($value) { // Getting the filemanager label from the DOM. $fieldlabel = $this->get_field_locator(); // Getting the filepicker context and using the step definition // to upload the requested file. $uploadcontext = BehatContextHelper::get('behat_repository_upload'); $uploadcontext->i_upload_file_to_filemanager($value, $fieldlabel); }