【robotframework錯誤集合一】AttributeError: 'ForLoop' object has no attribute 'report_invalid_syntax'

一、錯誤異常

command: robot --argumentfile c:\users\yh001\appdata\local\temp\RIDEiqsta2.d\argfile.txt --listener C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:60746:False E:\robotframework\CSDNTest.html
unexpected error: [ ERROR ] Parsing 'E:\robotframework\CSDNTest.html' failed: AttributeError: 'ForLoop' object has no attribute 'report_invalid_syntax'

Try --help for usage information.

test finished 20190620 14:44:24

二、解決方案

1、首先查看腳本,並無異常

2、查看報錯信息,解析CSDNTest.html異常

3、打開CSDNTest.html文件,和腳本對比無明顯異常,唯一異常的就是註釋語句單獨出了一行

4、去掉註釋語句後重新執行腳本,執行成功

5、結論

同樣的腳本加上註釋,保存爲robot文件,執行卻不會報上述錯誤,初步估計是HTML格式的文件不支持那麼多列,後續有不同再補充

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章