Selenium出现 Expected browser binary location, but unable to find binary in default location 错误的解决方法

已经有了geckodriver.exe,但selenium出现以下错误,是因为系统中没有安装firefox:

selenium.common.exceptions.SessionNotCreatedException: Message: 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

安装最新版本的firfox之后再打开就可以了。

上一篇:编译TS发生 Property or signature expected


下一篇:error: expected ‘;‘ at end of member declaration 和 expected ‘)‘ before ‘&‘ toke等报错问题