RPA.Dialogs
NOTICE: The Dialogs library is now marked for deprecation. The library will be replaced by Assistant. In order to get more information about the changes and the migration guide, please check the release note: https://updates.robocorp.com/release/Gfko5-rpaframework-2200
The Dialogs library provides a way to display information to a user and request input while a robot is running. It allows building processes that require human interaction.
Some examples of use-cases could be the following:
- Displaying generated files after an execution is finished
- Displaying dynamic and user-friendly error messages
- Requesting passwords or other personal information
- Automating based on files created by the user
Workflow
The library is used to create dialogs, i.e. windows, that can be composed on-the-fly based on the current state of the execution.
The content of the dialog is defined by calling relevant keywords such as Add text or Add file input. When the dialog is opened the content is generated based on the previous keywords.
Depending on the way the dialog is started, the execution will either block or continue while the dialog is open. During this time the user can freely edit any possible input fields or handle other tasks.
After the user has successfully submitted the dialog, any possible entered input will be returned as a result. The user also has the option to abort by closing the dialog window forcefully.
Results
Each input field has a required name argument that controls what the value will be called in the result object. Each input name should be unique, and must not be called submit as that is reserved for the submit button value.
A result object is a Robot Framework DotDict, where each key is the name of the input field and the value is what the user entered. The data type of each field depends on the input. For instance, a text input will have a string, a checkbox will have a boolean, and a file input will have a list of paths.
If the user closed the window before submitting or there was an internal error, the library will raise an exception and the result values will not be available.
Examples