After some time of plucking feathers on this, I have ran out of options.
Im in the process of setting up a selenium based build server and had much success up to the point of introducing Google-Chrome.
I'm at a point now where I can successfully run a test case via selenium and even capture the screenshots no problem on Firefox headless and all but Chrome is not playing ball.
I have followed all the steps I could find from running older versions to re-installations and no luck.
When I call phpunit and the test is set to use Firefox, then all good:
PHPUnit 5.7.20 by Sebastian Bergmann and contributors. Runtime: PHP 7.0.15-0ubuntu0.16.04.4 with Xdebug 2.4.0 Configuration: /private/var/www/functionaltests/vaimodev/tests/functional/phpunit.xml.dist . 1 / 1 (100%) Time: 10.61 seconds, Memory: 4.00MB OK (1 test, 1 assertion)
And now same test but set to use chrome:
1) defaultTest::testTitle PHPUnit_Extensions_Selenium2TestCase_WebDriverException: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"10699.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=58.0.3029.110) (Driver info: chromedriver=2.9.248304,platform=Linux 4.4.0-72-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 46 milliseconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'm2.vaimo.dev', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-72-generic', java.version: '1.8.0_131' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{applicationCacheEnabled=false, rotatable=false, chrome={userDataDir=/tmp/.com.google.Chrome.5OdRZX}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, version=58.0.3029.110, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] Session ID: 68262783c1d2f9aba29f813504ed9606
I start up my selenium instance as follows:
DISPLAY=:8.8 java -Dwebdriver.gecko.driver=/home/vagrant/geckodriver -Dwebdriver.chrome.driver=/home/vagrant/chromedriver -Dchrome.binary=/opt/google/chrome/chrome -jar /home/vagrant/selenium-server-standalone-3.4.0.jar -port 4444 > /dev/null 2>&1 &
Any help would be appreciated at this stage...