You are on page 1of 2

Dialogs

Library version: 3.1.2


Library scope: global
Named arguments: supported

Introduction
A test library providing dialogs for interacting with users.
Dialogs is Robot Framework's standard library that provides means for pausing the test execution and getting input from users. The dialogs are
slightly different depending on whether tests are run on Python, IronPython or Jython but they provide the same functionality.
Long lines in the provided messages are wrapped automatically. If you want to wrap lines manually, you can add newlines using the \n character
sequence.
The library has a known limitation that it cannot be used with timeouts on Python. Support for IronPython was added in Robot Framework 2.9.2.

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

Keywords
Keyword Arguments Documentation
Execute Manual message, Pauses test execution until user sets the keyword status.
Step default_error=
User can press either PASS or FAIL button. In the latter case execution fails and an additional
dialog is opened for defining the error message.
message is the instruction shown in the initial dialog and default_error is the default value
shown in the possible error message dialog.
Get Selection message, *values Pauses test execution and asks user to select a value.
From User
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:
${user} = Get Selection From User Select user user1 user2 admin

Get Selections message, *values Pauses test execution and asks user to select multiple values.
From User
The selected values are returned as a list. Selecting no values is OK and in that case the returned list
is empty. Pressing Cancel fails the keyword.
message is the instruction shown in the dialog and values are the options given to the user.
Example:
${users} = Get Selections From User Select users user1 user2 admin

New in Robot Framework 3.1.


Get Value From message, Pauses test execution and asks user to input a value.
User default_value=,
hidden=False 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} = Get Value From User Input user name default
${password} = Get Value From User Input password hidden=yes

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 Pauses test execution until user clicks Ok button.
execution paused.
Press OK to message is the message shown in the dialog.
continue.

Altogether 5 keywords.
Generated by Libdoc on 2019-05-24 11:14:46.

Dialogs
Library version: 3.1.2
Library scope: global
Named arguments: supported

Introduction
A test library providing dialogs for interacting with users.
Dialogs is Robot Framework's standard library that provides means for pausing the test execution and getting input from users. The dialogs are
slightly different depending on whether tests are run on Python, IronPython or Jython but they provide the same functionality.
Long lines in the provided messages are wrapped automatically. If you want to wrap lines manually, you can add newlines using the \n character
sequence.
The library has a known limitation that it cannot be used with timeouts on Python. Support for IronPython was added in Robot Framework 2.9.2.

You might also like