I have trouble setting up PHPUnit and Selenium testing environment on Windows 7 x64 machine. Apache/2.4.20 (Win64) OpenSSL/1.0.2h PHP/7.0.11.
My composer.json files looks like this (snipet):
"require": {
"php": ">=5.6.0",
"psr/http-message": "^1.0",
"psr/cache": "^1.0",
"zendframework/zend-diactoros": "^1.3",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit-selenium": "^3.0"
},
I have the following components downloaded already:
- selenium-server-standalone-3.0.1 from http://www.seleniumhq.org/download/
- chromedriver_win32.zip (ofc extracted) from https://chromedriver.storage.googleapis.com/index.html?path=2.27/
all the files are stored in the folder D:\dev\selenium\.
Selenium server is started by issuin the following command C:\ProgramData\Oracle\Java\javapath\java.exe -Dwebdriver.chrome.driver="D:\dev\selenium\chromedriver.exe" -jar "D:\dev\selenium\selenium-server-standalone-3.0.1.jar"
in command prompt.
I was searchring all day long on Google but found nothing; this is why I am asking you guys. When I'am trying to run tests by executing the command phpunit in project folder I get no result. Chrome opens up with the URL data:; and closes immadiately. Firefox is worst, it doesn't even opens. Standard PHPUnit tests are executin properly and I can see the results of those.
-- Edit --
Forgot to mention I am using Chrome version 55.0.2883.87 m x64. If somebody could suggest version combination all of these which actually works I would be really happy.
-- Edit 2 --
Java version: 8 update 111
Console output of Selenium server:
09:50:06.651 INFO - Selenium build info: version: '3.0.1', revision: '1969d75'
09:50:06.651 INFO - Launching a standalone Selenium Server
2017-01-09 09:50:06.682:INFO::main: Logging initialized @414ms
09:50:06.745 INFO - Driver class not found: com.opera.core.systems.OperaDriver
09:50:06.745 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
09:50:06.745 INFO - Driver class not found: com.opera.core.systems.OperaDriver
09:50:06.745 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
09:50:06.760 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped: registration capabilities Capabilities [{browserName=safari, version=, platform
=MAC}] does not match the current platform VISTA
2017-01-09 09:50:06.807:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2017-01-09 09:50:06.823:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@f5e5e3{/,null,AVAILABLE}
2017-01-09 09:50:06.994:INFO:osjs.ServerConnector:main: Started ServerConnector@c4039c{HTTP/1.1}{0.0.0.0:4444}
2017-01-09 09:50:06.994:INFO:osjs.Server:main: Started @739ms
09:50:06.994 INFO - Selenium Server is up and running
-- Edit 3 --
PHPUnit_Extensions_Selenium2TestCase_WebDriverException: The best matching driver provider org.openqa.selenium.edge.EdgeDriver 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: '****', ip: '10.10.146.251', os.name: 'Windows 7', os.arch: 'x86 (????)', os.version: '6.1', java.version: '1.8.0_111'
Driver info: driver.version: unknown
Can not believe that nobody responded yet. Almost two days and I could not get closer to the solution. Anyhow I am currently considering Codeception as an alternative, it is a shame the Selenium does not have better support!