title: Behat/Mink/Selenium2 element is not visible
body: <p>I'm writing my tests with behat and I'm facing a problem when I try to call fillField on a input inside a bootstrap modal.
  When I send fillField in this input selenium throws an exception saying: </p>
  
  <pre><code>Element is not currently visible and so may not be interacted with
  </code></pre>
  
  <p>I've created a selenium (via selenium IDE) test manually and called type on the same field and it worked fine.</p>
  
  <pre><code>$page = $this-&gt;getSession()-&gt;getPage()
  $page-&gt;fillField("id_item", $value);
  </code></pre>
  
  <p>The <code>$value</code> is a parameter from my test. I've tried to call a function to wait some seconds, but it didn't worked as well.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Scenario:</p>
  
  <pre><code>Scenario: Realizar Pedido de Compra
  Given I am on "/"
  When I fill the form with "{\"id\": 1, \"items\":[{\"id_item\": 1}]}"
  Then I should see "Ok"
  </code></pre>
  
  <p>My FeatureContext:</p>
  
  <pre><code>/**
   * @When I fill the form with :arg1
   */
  public function iFillForm($json) {
      $formHelper = FormHelper::getInstance($this-&gt;getSession());
      $formHelper-&gt;fill($json);
  }
  </code></pre>
  
  <p>In my class FormHelper:</p>
  
  <pre><code>public function fill($json) {
      $handler = new SelectorsHandler();
      $handler-&gt;registerSelector("css", new CssSelector());
      $fileJson = json_decode($json, true);
      $page = $this-&gt;session-&gt;getPage();
      foreach ($json as $key =&gt; $value) {
         if (is_array($value)) {
            $addSubGrid = $page-&gt;find("css", "#btn-plus-" . $key);
            if ($addSubGrid != null) {
               $subGrid = $page-&gt;find("css", "#" . $key);
               $formId = $subGrid-&gt;getAttribute("data-form");
               $ok = $page-&gt;find("css", "#$formId .btn-ok");
               foreach ($value as $formItem) {
                  $itemFilled = array();
                  $addSubGrid-&gt;click();
                  $this-&gt;session-&gt;wait(
                     1000, "$('#modal-$formId').is(':visible')"
                  );
                  $this-&gt;fillForm($page, array("form-item" =&gt; $formItem), $itemFilled, false);
                  $ok-&gt;press();
               }
            }
         } else {
            $page-&gt;fillField($key, $value);
         }
      }
  </code></pre>
  
  <p>The <code>$addSubGrid</code> var is the elment to show the modal. When I execute the test it opens the modal but when it goes into <code>$page-&gt;fillField($key, $value)</code> it does not work.</p>
  
  <p><strong>UPDATE</strong>
  I've found that I was trying to fill a disabled field. I've enabled it and the problem now is that it does not fill the fields inside the modal, just the ones outside.</p>