I am trying to use Symfony Panther (Symfony 5.1, Windows 10, I have Chrome and Firefox) for the first time and the first line is already not working.
With the Github documentation ( Basic Usage ), here are my errors :
$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.
Second attempt with 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
Third attempt with Firefox and binary :
$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');
You need to Update-upgrade Chrome client
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.