Firstly I was getting the following error:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
So I have used export DISPLAY=:0
to circumvent this problem. Followed to that I have found Selenium tests were running using the root user and all was fine.
However now I can see when these tests are getting executed from Jenkins the following error is coming up:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
No protocol specified
Error: cannot open display: :0
I am running this on a Redhat 6 box.