I'm getting the following error when I try to open the Firefox in headless mode:
Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port
7055; process output follows:
(process:27527): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Xlib: extension "RANDR" missing on display ":1".
(firefox:27527): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-VBJDTHN8W2: Connection refused
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
System info: host: 'cpro22808', ip: '176.153.5.11', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version:
'1.7.0_55'
Driver info: driver.version: FirefoxDriver
I'm using Ubuntu 14.04, Firefox 33, Selenium 2.44, Tomcat7, Xvfb.
I'm starting the Xvfb like that:
Xvfb :1 -ac -screen 0 1024x768x24
My java code:
String Xport = System.getProperty("lmportal.xvfb.id", ":1");
FirefoxBinary firefoxBinary = new FirefoxBinary();
firefoxBinary.setEnvironmentProperty("DISPLAY", Xport);
webDriver = new FirefoxDriver(firefoxBinary, null);
I spent several days on this and tried a lot of things and nothing solve. Can someone help me?