PyCharm 机器人框架

Robot Framework with PyCharm

我对自动化完全陌生,正在尝试学习 RobotFramework。我正在尝试按照一些视频指南编写脚本。通常机器人脚本会在 PyCharm IDE 中使用所需的颜色自动完成。我发现整个脚本以及 4 个部分(设置、变量、测试用例和关键字)都是绿色的。不确定如何更改那个东西。

***  Settings ***
Doumentation  This is some basic info about the whole suite

Library   Selenium2Library


*** variables ***


***  Test Cases ***
User must sign in to check out
    [Documentation]  This is somebasic information about the test
    [Tags]   Smoke
    Open browser   http://www.amazon.com  chrome
    Close browser


***  keywords ***

另外,当我 运行 这个脚本时,我收到错误

[ ERROR ] Parsing 'tests/amazon.robot' failed: File has no test case table.

***Test Cases 之间以及 ***Settings 之间不能有两个或更多空格。在您使用的格式中,两个空格标记 table 行中两个单元格之间的分隔。字符串 *** Test Cases *** 需要全部在一个单元格中。

为什么不使用专用的 IDE、RIDE?以前有点bug,但是已经做了很多工作,现在效果很好。我强烈推荐试一试,它使工作变得容易得多。