使用参数将http POST传递到/ session的卷发错误:Facebook \ WebDriver \ Exception

时间:2018-06-22 02:37:05

标签: laravel webdriver laravel-dusk

在您运行laravel 5.6黄昏时,是否有人遇到过此类错误

错误或登录到终端:

Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["--disable-gpu","--headless"]}}}

Failed to connect to localhost port 9515: Connection refused

1 个答案:

答案 0 :(得分:3)

确保您的Chrome驱动程序是可执行的并且正在运行。尝试执行以下命令

  

./ vendor / laravel / dusk / bin / chromedriver-linux --port = 8888

您应该看到以下输出

  

在端口8888上启动ChromeDriver 2.x.x(649f9b868f6783ec9de71c123212b908bf3b232e)   仅允许本地连接。