Reputation: 3680
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?
Upvotes: 5
Views: 4749
Reputation: 81
In order to run laravel dusk you need to have google chrome installed.
That being said if you are using Homestead simply enable the webdriver feature in your Homestead.yaml configuration:
features:
- webdriver: true
Remember that after enabling the webdriver feature, you need to reboot/provison your homestead to load the config change.
vagrant reload --provision
Sources:
https://laravel.com/docs/8.x/homestead#laravel-dusk
https://laravel.com/docs/9.x/homestead#laravel-dusk
Upvotes: 1
Reputation: 540
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.
Upvotes: 1
Reputation: 71
As you already have ChromeDrive you maybe just need to start it
./vendor/laravel/dusk/bin/chromedriver-linux
Upvotes: 1