Jul 17, 2024
0
Level 63
Laravel sail + dusk
Hello,
I have followed the documentation to install dusk with sail.
I run the test with php artisan dusk and I get this error.
FAILED Tests\Browser\ExampleTest > basic example WebDriverCurlException
Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless=new"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","goog:chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless=new"]}}}
Failed to connect to localhost port 9515 after 0 ms: Connection refused
at vendor/php-webdriver/webdriver/lib/Exception/Internal/WebDriverCurlException.php:20
16▕ }
17▕
18▕ $message .= "\n\n" . $curlError;
19▕
➜ 20▕ return new self($message);
21▕ }
22▕ }
23▕
+3 vendor frames
4 tests/DuskTestCase.php:39
+1 vendor frames
6 tests/Browser/ExampleTest.php:16
FAILED Tests\Browser\ExampleTest > basic example WebDriverCurlException
Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless=new"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","goog:chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless=new"]}}}
Failed to connect to localhost port 9515 after 0 ms: Connection refused
at vendor/php-webdriver/webdriver/lib/Exception/Internal/WebDriverCurlException.php:20
16▕ }
17▕
18▕ $message .= "\n\n" . $curlError;
19▕
➜ 20▕ return new self($message);
21▕ }
22▕ }
23▕
+3 vendor frames
4 tests/DuskTestCase.php:39
+1 vendor frames
6 tests/Browser/ExampleTest.php:16
Probably a problem with the chrome driver.
On Ubuntu, I'm using Chromium, is it possible that chromium is not compatible with Dusk ?
Any other idea why it doesn't work ?
And if the problem is effectively Chromium, is there any possibility to have the dusk tests run without having to install Chrome on Ubuntu ?
Thanks for your help.
V
Please or to participate in this conversation.