O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – running tests with XVFB

We will have to make sure that we have XVFB running on the machine.

  1. Open a terminal.
  2. We need to export the display so that everything that is launched from it uses the one that we have set up earlier. We do this with:
    Export DISPLAY=0.1
    
  3. Now we just need to run our tests. You will see that the browser may launch in the dock but it should not actually be visible.

What just happened?

We have successfully managed to get our tests running using XVFB. We saw that the tests that we were running, and launching a browser on our displays, still finished with the same results as before.

This can be useful for situations where you may have your tests running on change and you know that the browser will not try stealing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required