Question

I have a project with some requirements: install jenkins, selenium, behat on a Vagrant box with ubuntu 12.04. I installed jenkins, selenium, behat on this box. When i run selenium, jenkins and run some behat test, the error display :

- Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
      Error: no display specified
      Error: no display specified

I installed firefox and use selenium-server-standalone-2.35.0.

firefox -v
Mozilla Firefox 24.0

What should i do?

Thanks

Was it helpful?

Solution

Its most likely that your Jenkins user does not have an X session to run firefox in.

You can use something like Xvfb which is a virtual frame buffer How do I run Selenium in Xvfb?

Alternatively you could use phantomjs/ghostdriver which is a totally headless webdriver for selenium https://github.com/detro/ghostdriver - so you don't need any X at all.

I personally run a selenium hub and connect various drivers to it for different browsers. These drivers can be on different machines and platforms so you can fully test different configurations

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top