Reputation: 1639
JBrowserDriver is said to be headless webkit which I wish to use with my phpunit. I dont know how to configure it to that it can be used.
I tried it with selenium server standalone and calling it from my unit:
$this->setBrowser('jBrowserDriver');
and the server complaints:
Caused by: org.openqa.selenium.WebDriverException: The best matching driver provider org.openqa.selenium.safari.SafariDriver can't create a new driver instance for Capabilities [{browserName=jbrowserdriver}]
I have tried setting CLASSPATH but that also does not help selenium find the class in jbrowserdriver-0.8.2.jar
.
How do I this setup so selenium can start using it and later phpunit can also use it. I am using MacOS.
Upvotes: 1
Views: 2786
Reputation: 736
jBrowserDriver will support this in the upcoming version 0.10.0. To ensure you can load this, put jBrowserDriver and all of its dependencies on the classpath. Also use "jbrowserdriver" (lowercase) as the name, $this->setBrowser('jbrowserdriver');
FYI, to make a WebDriver available in Selenium Server, on your classpath have a directory named META-INF/services
containing a file named org.openqa.selenium.remote.server.DriverProvider
and inside of that file list the package/class name of the concrete class that implements org.openqa.selenium.remote.server.DriverProvider
or extends org.openqa.selenium.remote.server.DefaultDriverProvider
. (For details, see http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html). However, v0.10.0+ of jBrowserDriver will do this for you out of the box.
(disclosure: I'm that project's owner)
Upvotes: 1