gpt4 book ai didi

symfony - 无法启动 Symfony Panther

转载 作者:行者123 更新时间:2023-12-02 02:40:22 29 4
gpt4 key购买 nike

我正在尝试使用 Symfony Panther (Symfony 5.1,Windows 10,我有 Chrome 和 Firefox)第一次,第一行已经不工作了。

根据 Github 文档 ( Basic Usage ),这是我的错误:

$client = \Symfony\Component\Panther\Client::createChromeClient();

// error : session not created: This version of ChromeDriver only supports Chrome version 80
// it's true, my Chrome version is 85. Eventually, I want to disable the sessions for it to work but I don't know how to do it.

第二次尝试使用 Firefox:

$client = \Symfony\Component\Panther\Client::createFirefoxClient();

// Error : Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

第三次尝试使用 Firefox 和二进制文件:

$client = \Symfony\Component\Panther\Client::createFirefoxClient('C:\Program Files\Mozilla Firefox\firefox');

// my browser opens but nothing happens (blank page)
// PHP error : Could not start firefox (or it crashed) after 30 seconds.

最佳答案

我遇到了同样的情况,我决定将驱动程序的路径放在函数中

$client = Client::createChromeClient(__DIR__.'/../../drivers/chromedriver');

关于symfony - 无法启动 Symfony Panther,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63724972/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com