Robot Framework-Dialogs

Shortcuts

Execute Manual Step · Get Selection From User · Get Value From User · Pause Execution

执行手动步骤 · 获取选择从用户 · 获得值从用户 · 暂停执行

Keywords

KeywordArgumentsDocumentation
Execute Manual Stepmessage, default_error=


暂停测试执行,直到用户设置关键字状态。

用户可以按任一PASSFAIL按钮。在后一种情况下,执行失败,并打开另一个对话框来定义错误消息。

message是初始对话框中显示的指令,default_error是可能的错误消息对话框中显示的默认值。

Get Selection From Usermessage, *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 UserSelect user nameuser1user2admin
Get Value From Usermessage, 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 falsenone or no, case-insensitively. If it is not a string, its truth value is got directly using same rules as in Python.

9e4b6c2cc7c29534f288d7fa18e8f99977a.jpg

Example:

${username} =Get Value From UserInput user namedefault
${password} =Get Value From UserInput passwordhidden=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 nonefalse is new in RF 3.0.3.

Pause Executionmessage=Test execution paused. Press OK to continue.

暂停测试执行直到用户单击Ok按钮。.

message is the message shown in the dialog.

 

 

转载于:https://my.oschina.net/u/3447023/blog/1928036

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值