Laravel Dusk: cannot find Chrome binary

Viewed 2238

I'm following the instructions on how to run browser tests from here https://laravel.com/docs/8.x/dusk on a fresh install of Laravel using Homestead running on a VirtualBox vm.

When I try to run artisan dusk however, it fails and tells me it can't find the Chrome binary.

1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\UnknownErrorException: unknown error: cannot find Chrome binary`

Googling tells me to install the Chrome Binary (of course) but that appears to have been done already. Scrolling up the CLI, I see the following from when I ran dusk install.

Downloading ChromeDriver binaries...
ChromeDriver binaries successfully installed for version 86.0.4240.22.

So is there something else I need to install, or do I need to tell dusk where to look for the binary, or is it something else entirely?

2 Answers

As you already have ChromeDrive you maybe just need to start it

./vendor/laravel/dusk/bin/chromedriver-linux 

You simply need to have chrome installed. That's it. Not chrome dev or canary or any of those alternave versions, you need to have the real chrome browser installed. I had chrome dev installed and I kept getting this error until I downloaded the actual chrome.

Related