Xvfb on Windows Xvfb on Windows selenium selenium

Xvfb on Windows


You can't use pyvirtualdisplay on Windows.

It is just a wrapper that calls Xvfb. Xvfb is a headless display server for the X Window System. Windows does not use the X Window System.


For windows users you can use the free VNC utility.. For example if you are running docker you can do it in 3 steps:

  1. Run a docker image that has the standalone firefox server (that has port 5900 exposed for VNC)
    $ docker run -d -p 4444:4444 -p 5990:5990 selenium/standalone-firefox-debug
  1. Open VNC and connect to that host localhost:5990, password is 'secret'

enter image description here

  1. Now simply execute your selenium script and you will see what's happening in VNC window live as its happening. Just make sure the script is pointing to your docker standalone server like localhost:4444/wd/hub in order for it to work