I have been following this info https://laravel.com/docs/10.x/sail#laravel-dusk to get dusk to work with sail.
When I try to run a dusk test with: sail dusk
… I get: Failed to connect to localhost port 9515 after 0 ms: Connection refused
FacebookWebDriverExceptionInternalWebDriverCurlException: Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--window-size=1920,1080"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"args":["--window-size=1920,1080"]}}}
what do you think this is?
I am on a mac, with Firefox as default browser. Nothing of this should matter (right?) since I use sail and are using a dockerized local env.
2
Answers
Make sure you have selenium defined in your docker-compose.yml. If not, follow documentation here: https://laravel.com/docs/10.x/sail#laravel-dusk
Also you need to run "sail dusk" instead of "sail artisan dusk".
This could be an SSL thing.
The simplest way to check would be to edit your
driver()
method intests/DuskTestCase.php
to allow your web driver to accept insecure certificates.If that solves it you can either keep it like that review your SSL cert config