Shortcuts
Execute Manual Step · Get Selection From User · Get Value From User · Pause Execution
执行手动步骤 · 获取选择从用户 · 获得值从用户 · 暂停执行
Keywords
Keyword | Arguments | Documentation |
---|
Execute Manual Step | message, default_error= |
暂停测试执行,直到用户设置关键字状态。 用户可以按任一PASS 或FAIL 按钮。在后一种情况下,执行失败,并打开另一个对话框来定义错误消息。 message 是初始对话框中显示的指令,default_error 是可能的错误消息对话框中显示的默认值。 |
|
Get Selection From User | message, *values | Pauses test execution and asks user to select a value. The selected value is returned. Pressing Cancel fails the keyword. message is the instruction shown in the dialog and values are the options given to the user. Example:
${username} = | Get Selection From User | Select user name | user1 | user2 | admin |
|
Get Value From User | message, default_value=,hidden=False | Pauses test execution and asks user to input a value. Value typed by the user, or the possible default value, is returned. Returning an empty value is fine, but pressing Cancel fails the keyword. message is the instruction shown in the dialog and default_value is the possible default value shown in the input field. If hidden is given a true value, the value typed by the user is hidden. hidden is considered true if it is a non-empty string not equal to false , none or no , case-insensitively. If it is not a string, its truth value is got directly using same rules as in Python. ![9e4b6c2cc7c29534f288d7fa18e8f99977a.jpg](https://i-blog.csdnimg.cn/blog_migrate/58465bb5117b1405920270c50662e3d5.jpeg) Example:
${username} = | Get Value From User | Input user name | default | ${password} = | Get Value From User | Input password | hidden=yes |
Possibility to hide the typed in value is new in Robot Framework 2.8.4. Considering strings false and no to be false is new in RF 2.9 and considering string none false is new in RF 3.0.3. |
Pause Execution | message=Test execution paused. Press OK to continue. | 暂停测试执行直到用户单击Ok 按钮。. message is the message shown in the dialog. |