Laravel Dusk 报错:Facebook\WebDriver\Exception\UnknownServerException: unknown error: cannot get automation extension 的处理办法
报错如下:
There was 1 error:
1) Tests\Browser\OrderTest::a_user_can_see_item_title
Facebook\WebDriver\Exception\UnknownServerException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: chrome=57.0.2987.133)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Mac OS X 10.12.3 x86_64)
错误原因
chrome 升级到 v57,而 dusk v1.0.11 之前版本自带的 chromedriver 2.27 并不支持此版本的 chrome
两种解决办法
- 手动从 这里下载 chromedriver v2.28,放入 vendor/laravel/dusk/bin 路径下;
- composer update 更新 Laravel Dusk 到最新版本