I\'ve been using Selenium for 2 weeks.
It\'s been really useful so far.
When developing, I like having the browsers pop up so I can see what\'s going on, b
Try PhantomJS which is a headless browser webkit. HTMLUnit is also similar to PhantomJs; however, usage of PhamtomJs is highly recommended.
PhantomJs uses Google chrome's JavaScript Engine
but without a GUI.
Refer :http://phantomjs.org/
Found simple solutin for JAVA Seleniun Google Chrome
System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("headless");
return new ChromeDriver(options);
Give it a try : https://github.com/detro/ghostdriver.
It uses Headless approach to automate websites.
Have you thought about running against a Selenium Grid instead? See https://code.google.com/p/selenium/wiki/Grid2
Phantom is good headless option, but sssuming you want to stick with same tools you are using ... (the following assumes Linux as platform)
DISPLAY=:1 xvfb-run java -jar [selenium JAR filename]
Now, when your test suite kicks off selenium, it will run using Firefox without browser windows popping up.
if the server is on linux, you can allocate a display just to run selenium using Xvfb to create a virtual display
if the server is on windows you can register the daemon to run as another user than the user logged in, giving the service a desktop. this only work for the local system admin account or by registry tweaking as detailed here note that you will have to set up internet explorer properties for the user the service is running as