打开浏览器时,如果错误提示:
报错'Capture Page Screenshot' could not be run on failure: No browser is open
碰到这个问题,首先确认一下你的selenium是什么版本,如图是selenium3.0以上的,并且其日志中的错误中包含: ‘geckodriver’ executable needs to be in PATH.
解决办法:
1.下载geckodriver.exe,下载路径:https://github.com/mozilla/geckodriver/releases,
2.放到Python路径下就可以,如图: