I am having a great deal of difficulty getting selenium 3.0.1 to work with phpunit 2.53 and java 1.8.0_121. I have installed:
echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/bin/selenium:/usr/local/bin/phpunit:/usr/local/bin/composer:/usr/local/bin/geckodriver
[bjt@localhost ~]$ java -Dwebdriver.gecko.driver="/usr/local/bin/geckodriver/geckodriver" -jar /usr/local/bin/selenium/selenium-server-standalone.0.1.jar
09:11:25.076 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
 registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
09:11:25.077 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
09:11:25.077 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
09:11:25.078 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
09:11:25.079 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
2017-02-27 09:11:25.346:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@6d8a00e3{/,null,AVAILABLE}
2017-02-27 09:11:25.431:INFO:osjs.ServerConnector:main: Started ServerConnector@548a9f61{HTTP/1.1}{
There are warnings, but not about any browser I'm using.
?>
When I run this test:
[bjt@localhost projects]$ /usr/local/bin/phpunit/phpunit-5.7.13.phar -vvv test.php
I get the following:
   at java.util.concurrent.FutureTask.report(FutureTask.java:122)
   at java.util.concurrent.FutureTask.get(FutureTask.java:192)
   at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
   at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
   at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
   at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:131)
   at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
   at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:36)
   at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
   at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:189)
   at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:222)
   at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:184)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:150)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
   at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:808)
   at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:587)
   at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
   at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:515)
   at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
   at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
   at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
   at org.seleniumhq.jetty9.server.Server.handle(Server.java:499)
   at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:310)
   at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:257)
   at org.seleniumhq.jetty9.io.AbstractConnection$2.run(AbstractConnection.java:540)
   at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
   at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.WebDriverException: The best matching driver provider Firefox/Marionette driver can't create a new driver instance for Capabilities [{browserName=*firefox}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'localhost.localdomain', ip: '127.0.0.1',
os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.10-100.fc24.x86_64', java.version: '1.8.0_121'
Driver info: driver.version: unknown
   at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:62)
   at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
   at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:209)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   ... 1 more
09:21:27.741 WARN - Exception: The best matching driver provider Firefox/Marionette driver can't create a new driver instance for Capabilities [{browserName=*firefox}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'localhost.localdomain', ip: '127.0.0.1',
os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.10-100.fc24.x86_64', java.version: '1.8.0_121'
Driver info: driver.version: unknown
phpunit threw a similar error:
[bjt@localhost projects]$ /usr/local/bin/phpunit/phpunit-5.7.13.phar -vvv test.php
PHPUnit 5.7.13 by Sebastian Bergmann and contributors.
Runtime:Â Â Â Â Â Â PHP 5.6.30
EÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1 / 1 (100%)
Time: 1 second, Memory: 12.50MB
There was 1 error:
1) test::testMyTestCase
PHPUnit_Extensions_Selenium2TestCase_WebDriverException: The best matching driver provider Firefox/Marionette driver can't create a new driver instance for Capabilities [{browserName=*firefox}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'localhost.localdomain', ip: '127.0.0.1',
os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.10-100.fc24.x86_64', java.version: '1.8.0_121'
Driver info: driver.version: unknown
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:165
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:72
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php:67
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:296
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:337
/usr/local/bin/composer/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:314
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
It does not appear that java, selenium server, and phpunit are communicating properly.
Can someone tell me what I'm doing wrong and how to correct this?
Thanks.