问题1:
[ WARN ] Automatically parsing other than '.robot' files is deprecated. Convert 'D:\PythonProject\test.txt' to '.robot' format or use '--extension' to explicitly configure which files to parse.
解决方案:
将test.txt文件后缀名改为 .robot
问题2:
[ ERROR ] Suite 'Results' contains no tests named ''.
解决方案:
Robot Run SingleTestCase/Robot Run TestSuite 中:
(1)Program路径要一致; 如:D:\Python373\Scripts\pybot.bat
(2)Arguments配置如下:
Robot Run SingleTestCase: -d results "$SelectedText$" ./
Robot Run TestSuite : -d results $FileName$
(3)Working directory 保持一致; $FileDir$
这里需要注意的一点,Program要选择pybot.bat这个文件,最新版的RF貌似没有这个文件,
解决方法:
在python的scripts路径下创建一个txt文件,然后复制下面的代码:(注意,e一定要是小写,大写是会报错的)
@echo off
python -m robot.run %*
最后文件后缀保存为.bat格式,这要操作完,program就可以选择pybot.bat文件了。