Starting test: WebClass.Class04.Example01
20210410 15:21:47.028 : INFO : Opening browser 'ff' to base url 'http://www.baidu.com'.
20210410 15:21:47.124 : INFO : Firefox driver log is always forced to to: C:\Users\ADMINI~1\AppData\Local\Temp\RIDEno_0hres.d\geckodriver-1.log
20210410 15:21:50.263 : INFO : Cannot capture screenshot because no browser is open.
20210410 15:21:50.402 : FAIL :
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
Ending test: WebClass.Class04.Example01
解决方式:需要下载geckodriver,并放在path的环境变量下,下载地址:https://github.com/mozilla/geckodriver/releases
这个我已经试过了,我的电脑不起作用
2.升级firefox