title: ElementNotVisibleException only in virtual display
body: <p>I have a script that needs to interact with a webpage via selenium. I need to use some kind of virtual display to keep the browser from showing up. </p>
  
  <p>The script as a whole works great until I introduce Xvfb into the mix. When I do that I get an <code>ElementNotVisibleException</code> the first time I actually try to interact with the page.</p>
  
  <p>I've tried using <code>xvfbwrapper</code> and <code>pyvirtualdisplay</code> with the same effect.</p>
  
  <p>And here is code that doesn't work:</p>
  
  <pre><code>from xvfbwrapper import Xvfb
  vdisplay = Xvfb()
  vdisplay.start()
  oBrowser = Browser()
  oBrowser.visit(sUrl)
  oBrowser.find_by_id('some_field')[0].fill(sValue)  #&lt;--ERROR
  vdisplay.stop()
  </code></pre>
  
  <p>And here is the code that does work (but displays the browser):</p>
  
  <pre><code>oBrowser = Browser()
  oBrowser.visit(sUrl)
  oBrowser.find_by_id('some_field')[0].fill(sValue) #&lt;--works every time
  </code></pre>
  
  <p>So how can I run my code on a virtual display?</p>
  
  <p>I've tried doing a <code>time.sleep</code> before trying to fill the field in but the problem doesn't seem to have anything to do with the page loading slowly. Any ideas?</p>