title: not able to attach a file (csv file) in input field using Behat Mink extension Framework
body: <p>I want to attach a CSV file in to an input field of type "file" using Behat Framework(Mink Extension).</p>
  
  <p>Html of input field---- input id="edit-ab-csv-file" class="form-file" type="file" size="60" name="files[ab_csv_file]"></p>
  
  <p>1st Method We tried 
  I have tried using attachfile() method in Driverinterface</p>
  
  <pre><code>/**
   * Attaches file to field with specified id|name|label|value.
   *
   * @When /^(?:|I )attach the file "(?P&lt;path&gt;[^"]*)" to "(?P&lt;field&gt;(?:[^"]|\\")*)"$/
   */
  
   public function attachFileToField($field, $path)
  {
      $field = $this-&gt;fixStepArgument($field);
  
      if ($this-&gt;getMinkParameter('files_path')) {
          $fullPath = rtrim(realpath($this-&gt;getMinkParameter('files_path')), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$path;
          if (is_file($fullPath)) {
              $path = $fullPath;
          }
      }
  
      $this-&gt;getSession()-&gt;getPage()-&gt;attachFileToField($field, $path);
  }
  
  
  }
  </code></pre>
  
  <p>2nd Method --WE tried to use Java script</p>
  
  <pre><code>$jscript = "document.getElementById('edit-ab-csv-file').value='//home//developer//build//tools//behat//Invaliduploadfile.csv';";
    $this-&gt;getSession()-&gt;getDriver()-&gt;executeScript($jscript);
  </code></pre>
  
  <p>I got an exception saying </p>
  
  <pre><code> The operation is insecure. (WARNING: The server did not provide any stack trace information)
        Command duration or timeout: 10 milliseconds
  </code></pre>
  
  <p>can anyone please help to fix this issue.</p>