title: Take screenshots at same time Xvfb multiple displays
body: <p>I have a requirement where I am running a selenium script which opens up 2 instances of Firefox on a machine. I want to take screenshots of both instances at the <strong>same time</strong>. The same time part is important. </p>
  
  <p>I used following steps to simulate this:</p>
  
  <ol>
  <li>Start 2 different displays using <code>Xvfb -ac :99 and Xvfb -ac :100</code></li>
  <li>I have 2 python scripts which sets environment variable DISPLAY to 99 and 100 respectively.</li>
  </ol>
  
  <p>Here are the python scripts:
  <strong>screenshot99.py</strong></p>
  
  <pre><code>#!/usr/bin/env python
  
  from pyvirtualdisplay import Display
  from selenium import webdriver
  import os
  
  os.environ['DISPLAY'] = ':99'
  
  display = Display(visible=0, size=(800, 600))
  display.start()
  
  browser = webdriver.Firefox()
  browser.get('http://www.test.com')
  browser.quit()
  
  display.stop()
  </code></pre>
  
  <p>and <strong>screenshot100.py</strong></p>
  
  <pre><code>#!/usr/bin/env python
  
  from pyvirtualdisplay import Display
  from selenium import webdriver
  import os
  
  os.environ['DISPLAY'] = ':100'
  
  display = Display(visible=0, size=(800, 600))
  display.start()
  
  browser = webdriver.Firefox()
  browser.get('http://www.test.com')
  browser.quit()
  
  display.stop()
  </code></pre>
  
  <p>I have 2 questions:</p>
  
  <ol>
  <li>Is it even possible to take screenshots of 2 different instances of browser at the <strong>same time</strong>?</li>
  <li>If yes, how can I simulate that? I just need a Proof Of Concept to prove the above fact.</li>
  </ol>