Robot Framework-Dialogs
时间: 2018-08-15来源:OSCHINA
前景提要
「深度学习福利」大神带你进阶工程师,立即查看>>>
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 Pause Execution
message, default_value=,hidden=False message=Test execution paused. Press OK to continue.
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 .

Example:

${username} = ${password} =
Get Value From User Get Value From User
Input user name Input password
default 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. 暂停测试执行直到用户单击 Ok 按钮。.
message is the message shown in the dialog.


科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行