I want to run Selenium test case with Chromium under Debian 6, which doesn't have any User Interface. For this I'm using 'xsimulator'. I set up my test:
public void setUp() throws Exception{
setName("test");
super.setUp("http://www.wikipedia.org/", "*googlechrome chromium-
browser);
}
It starts Chromium instance without any problem, but, since it's the first run of Chromium, it asks me make the default browser. Without UI (I'm on xsimulator) I can't click and make any of the choices. Actually, Chromium allows to start it without asking default browser check (argument '--no-default-browser-check'), but this only works in terminal. When I set up test like this:
super.setUp("http://www.wikipedia.org/", "*googlechrome usr/bin/chromium-browser --no-default-browser-check");
It throws null pointer exception:
java.lang.NullPointerException
at org.openqa.selenium.server.browserlaunchers.GoogleChromeLauncher.createCommandArray(GoogleChromeLauncher.java:168)
Another workaround could be to make the chrome default by running it on terminal using '--make-default-browser' argument, but unfortunately this leads to 'xdg' fault:
xdg-settings: unknown desktop environment
Segmentation fault
My question is: how to set up chromium browser in selenium test case with browser specific arguments like mentioned above or avoid default browser check?