ERROR: usage: main.py [options] [file_or_dir] [file_or_dir] [...]
main.py: error: unrecognized arguments: --html=./test_report.html
inifile: D:\learning\learning\kuangjia\new\XXX\pytest.ini
rootdir: D:\learning\learning\kuangjia\new\XXX
执行Python自动化脚本,结果报错,打开pytest.ini文件提示:解释器没有pytest-html插件,
那问题就好解决了,file---settings---project:XXX---python interpreter--点右面的“+”---搜索pytest-html然后安装---保存;
再运行,问题解决。
总结,遇到问题不要慌,按报错提示,一步一步找原因!