facebook/php-webdriver — Issue #11: htmlunit not supported
Author: ctradu
Created: 2011-11-30 15:03:38+00:00
State: open

If I try to use htmlunit as a headless browser here is what I get:
PHP Fatal error: Uncaught exception 'UnhandledWebDriverError' ...

The relevant lines of code are:
$browser = 'htmlunit';
$webdriver = 'http://127.0.0.1:4444/wd/hub';
$driver = new WebDriver($webdriver);
$sess = self::$driver->session($browser);

The selenium server outputs this:
16:48:18.362 INFO - Executing: [new session: {browserName=htmlunit}] at URL: /session)
16:48:18.364 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.14.0', revision: '14955', time: '2011-11-29 11:42:43'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.18-238.12.1.el5', java.version: '1.6.0_26'
Driver info: driver.version: unknown

However, this should work, as these guys http://code.google.com/p/php-webdriver-bindings/ managed to find a solution.
Regards.