Add Button

Create a button and execute the function as a callback when pressed.

Arguments

Argument Type Default value Description
labelstrnullText for the button
functionCallable, strnullPython function or Robot Keyword name, that will get *args and **kwargs passed into it
argsnull
locationVerticalLocationLeft
kwargsnull
param label:Text for the button
param function:Python function or Robot Keyword name, that will get *args and **kwargs passed into it

Examples

*** Keywords ***
First View
    Add Heading  Here is the first view of the app
    Add Button  Change View  Second View

Second View
    Add Heading  Let's build an infinite loop
    Add Button  Change View  First View

Add Checkbox

Add a checkbox element

Arguments

Argument Type Default value Description
namestrnullName of result field
labelstrnullLabel text for checkbox
defaultboolFalseDefault checked state
param name:Name of result field
param label:Label text for checkbox
param default:Default checked state

Adds a checkbox that indicates a true or false value. The selection will be available in the name field of the result, and the label text will be shown next to the checkbox.

The boolean default value will define the initial checked state of the element.

Examples

Add heading     Enable features
Add checkbox    name=vault        label=Enable vault       default=True
Add checkbox    name=triggers     label=Enable triggers    default=False
Add checkbox    name=assistants   label=Enable assistants  default=True
${result}=      Run dialog
IF    $result.vault
    Enable vault
END

Add Date Input

Add a date input element.

Arguments

Argument Type Default value Description
namestrnullName of the result field
defaultdate, str, NoneNoneThe default set date
labelstr, NoneNoneLabel for the date input field
param name:Name of the result field
param default:The default set date
param label:Label for the date input field

Displays a date input widget. The selection the user makes will be available as a date object in the name field of the result. The default argument can be a pre-set date as object or string in "YYYY-MM-DD" format, otherwise the current date is used.

Examples

Add heading       Enter your birthdate
Add Date Input    birthdate    default=1993-04-26
${result} =       Run dialog
Log To Console    User birthdate year should be: ${result.birthdate.year}

Add Drop-Down

Add a drop-down element

Arguments

Argument Type Default value Description
namestrnullName of result field
optionsList[str], strnullList of drop-down options
defaultstr, NoneNoneThe default selection
labelstr, NoneNoneLabel for input field
param name:Name of result field
param options:List of drop-down options
param default:The default selection
param label:Label for input field

Creates a drop-down menu with the given options. The selection the user makes will be available in the name field of the result.

The default argument can be one of the defined options, and the dialog automatically selects that option for the input.

A custom label text can also be added.

Examples

Add heading     Select user type
Add drop-down
...    name=user_type
...    options=Admin,Maintainer,Operator
...    default=Operator
...    label=User type
${result}=      Run dialog
Log    User type should be: ${result.user_type}

Add File

Add a file element, which links to a local file

Arguments

Argument Type Default value Description
pathstrnullThe path to the file
labelstr, NoneNoneA custom label text for the file
param path:The path to the file
param label:A custom label text for the file

Adds a button which opens a local file with the corresponding default application. Can be used for instance to display generated files from the robot to the end-user.

Optionally a custom label can be given for the button text. By default uses the filename of the linked file.

Examples

${path}=   Generate order files
Add heading    Current orders
Add file    ${path}    label=Current
Run dialog

Add File Input

Add a file input element

Arguments

Argument Type Default value Description
namestrnullName of result field
labelstr, NoneNoneLabel for input field
sourcestr, NoneNoneDefault source directory
file_typestr, NoneNoneAccepted file types
multipleboolFalseAllow selecting multiple files
param name:Name of result field
param label:Label for input field
param source:Default source directory
param file_type:
 Accepted file types
param multiple:Allow selecting multiple files

Adds a native file selection dialog for inputting one or more files. The list of selected files will be available in the name field of the result.

By default opens up in the user's home directory, but it can be set to a custom path with the source argument.

The argument file_type restricts the possible file extensions that the user can select. The format of the argument is as follows: pdf,png,svg. For instance, an argument to limit options to Excel files could be: xls,xlsx.

To allow selecting more than one file, the multiple argument can be enabled.

Examples

# This can be any one file
Add file input    name=anything

# This can be multiple files
Add file input    name=multiple  multiple=True

# This opens the select dialog to a custom folder
Add file input    name=src       source=C:\Temp\Output\

# This restricts files to certain types
Add file input    name=types     file_type=pdf

# Every file input result is a list of paths
${result}=    Run dialog
FOR    ${path}    IN    @{result.multiple}
    Log    Selected file: ${path}
END

Add Files

Add multiple file elements according to the given file pattern

Arguments

Argument Type Default value Description
patternstrnullFile matching pattern
param pattern:File matching pattern

See the keyword Add file for information about the inserted element itself.

The keyword uses Unix-style glob patterns for finding matching files, and the supported pattern expressions are as follow:

Pattern Meaning
* Match everything
? Match any single character
[seq] Match any character in seq
[!seq] Match any character not in seq
** Match all files, directories, and subdirectories

If a filename has any of these special characters, they can be escaped by wrapping them with square brackets.

Examples

# Add all excel files
Add files    *.xlsx

# Add all log files in any subdirectory
Add files    **/*.log

# Add all PDFs between order0 and order9
Add files    order[0-9].pdf

Add Flet Icon

Add an icon from a large gallery of icons.

Arguments

Argument Type Default value Description
iconstrnullCorresponding flet icon name. Check https://gallery.flet.dev/icons-browser/ for a list of icons. Write the name in lower_case
colorstr, NoneNoneColor for the icon. Default depends on icon. Allowed values are colors from https://github.com/flet-dev/flet/blob/035b00104f782498d084c2fd7ee96132a542ab7f/sdk/python/packages/flet-core/src/flet_core/colors.py#L37 or ARGB/RGB (#FFXXYYZZ or #XXYYZZ).
sizeint, None24Integer size for the icon.
param icon:Corresponding flet icon name. Check https://gallery.flet.dev/icons-browser/ for a list of icons. Write the name in lower_case
param color:Color for the icon. Default depends on icon. Allowed values are colors from https://github.com/flet-dev/flet/blob/035b00104f782498d084c2fd7ee96132a542ab7f/sdk/python/packages/flet-core/src/flet_core/colors.py#L37 or ARGB/RGB (#FFXXYYZZ or #XXYYZZ).
param size:Integer size for the icon.

Examples

Add Heading    Check icon
Add Flet Icon  icon_name=check_circle_rounded  color=FF00FF  size=48
Run Dialog

Add Heading

Add a centered heading text element

Arguments

Argument Type Default value Description
headingstrnullThe text content for the heading
sizeSizeMediumThe size of the heading
param heading:The text content for the heading
param size:The size of the heading

Supported size values are Small, Medium, and Large. By default uses the value Medium.

Examples

Add heading     User information  size=Large
Add heading     Location          size=Small
Add text input  address           label=User address
Run dialog

Add Hidden Input

Add a hidden input element

Arguments

Argument Type Default value Description
namestrnullName of result feild
valuestrnullValue for input
param name:Name of result feild
param value:Value for input

Adds a special hidden result field that is not visible to the user and always contains the given static value.

Can be used to keep user input together with already known values such as user IDs, or to ensure that dialogs with differing elements all have the same fields in results.

Examples

Add hidden input   user_id   ${USER_ID}
Add text input     username
${result}=         Run dialog
Enter user information    ${result.user_id}    ${result.username}

Add Icon

Add an icon element from RPA.Assistant's short icon list.

Arguments

Argument Type Default value Description
variantIconnullThe icon type
sizeint48The size of the icon
param variant:The icon type
param size:The size of the icon

Adds an icon which can be used to indicate status or the type of dialog being presented.

The currently supported icon types are:

Name Description
Success A green check mark
Warning An orange warning triangle
Failure A red cross or X mark

The size of the icon can also be changed, to a given height/width of pixels.

Examples

Add icon              Warning    size=64
Add heading           Do you want to delete this order?
Add submit buttons    buttons=No,Yes
${result}=    Run dialog

Add Image

Add an image element, from a local file or remote URL

Arguments

Argument Type Default value Description
url_or_pathstrnullThe location of the image
widthint, NoneNoneThe static width of the image, in pixels
heightint, NoneNoneThe static height of the image, in pixels
param url_or_path:
 The location of the image
param width:The static width of the image, in pixels
param height:The static height of the image, in pixels

Adds an inline image to the dialog, which can either point to a local file path on the executing machine or to a remote URL.

By default the image is resized to fit the width of the dialog window, but the width and/or height can be explicitly defined to a custom value. If only one of the dimensions is given, the other is automatically changed to maintain the correct aspect ratio.

Examples

Add image      company-logo.png
Add heading    To start, please press the Continue button   size=Small
Add submit buttons    Continue
Run dialog

Add Next Ui Button

Create a button that leads to the next UI page, calling the passed keyword or function, and passing current form results as first positional argument to it.

Arguments

Argument Type Default value Description
labelstrnullText for the button
functionCallable, strnullPython function or Robot Keyword name, that will take form results as its first argument
param label:Text for the button
param function:Python function or Robot Keyword name, that will take form results as its first argument

Examples

*** Keywords ***
Retrieve User Data
    # Retrieves advanced data that needs to be displayed

Main Form
    Add Heading  Username input
    Add Text Input  name=username_1  placeholder=username
    Add Next Ui Button        Show customer details  Customer Details

Customer Details
    [Arguments]  ${form}
    ${user_data}=  Retrieve User Data  ${form}[username_1]
    Add Heading  Retrieved Data
    Add Text  ${user_data}[phone_number]
    Add Text  ${user_data}[address]

Add Password Input

Add a password input element

Arguments

Argument Type Default value Description
namestrnullName of result field
labelstr, NoneNoneLabel for field
placeholderstr, NoneNonePlaceholder text in input field
param name:Name of result field
param label:Label for field
param placeholder:
 Placeholder text in input field

Adds a text field that hides the user's input. The entered content will be available in the name field of the result.

For customizing the look of the input, the label text can be given to add a descriptive label and the placholder text can be given to act as an example of the input value.

Examples

Add heading    Change password
Add text input        username    label=Current username
Add password input    password    label=New password
${result}=    Run dialog
Change user password    ${result.username}  ${result.password}

Add Radio Buttons

Add radio button elements

Arguments

Argument Type Default value Description
namestrnullName of result field
optionsList[str], strnullList of drop-down options
defaultstr, NoneNoneThe default selection
labelstr, NoneNoneLabel for input field
param name:Name of result field
param options:List of drop-down options
param default:The default selection
param label:Label for input field

Creates a set of radio buttons with the given options. The selection the user makes will be available in the name field of the result.

The default argument can be one of the defined options, and the dialog automatically selects that option for the input.

A custom label text can also be added.

Examples

Add heading     Select user type
Add radio buttons
...    name=user_type
...    options=Admin,Maintainer,Operator
...    default=Operator
...    label=User type
${result}=      Run dialog
Log    User type should be: ${result.user_type}

Add Slider

Add a slider input.

Arguments

Argument Type Default value Description
namestrnullName of result field
slider_minint, float0Minimum value of the slider
slider_maxint, float100Maximum value of the slider
thumb_text{value}
stepsint, NoneNoneAmount of steps for the slider. If None, the slider will be continuous. For integer output, specify a steps value where all the steps will be integers, or implement rounding when retrieving the result.
defaultint, float, NoneNoneDefault value for the slider. Must be between min and max.
decimalsint, None1How many decimals should the value have and show.
param name:Name of result field
param slider_min:
 Minimum value of the slider
param slider_max:
 Maximum value of the slider
param thumb_label:
 Text to display when the slider is being slided. Use the placeholder {value} for the number. (thumb text {value%} will display values: 0%, 100%)
param steps:Amount of steps for the slider. If None, the slider will be continuous. For integer output, specify a steps value where all the steps will be integers, or implement rounding when retrieving the result.
param default:Default value for the slider. Must be between min and max.
param decimals:How many decimals should the value have and show.
*** Keywords ***
Create Percentage Slider
    Add Text    Percentage slider
    Add Slider  name=percentage  slider_min=0  slider_max=100
                thumb_text={value}%  steps=100  round=1

Add Submit Buttons

Add custom submit buttons

Arguments

Argument Type Default value Description
buttonsList[str], strnullSubmit button options
defaultstr, NoneNoneThe primary button
param buttons:Submit button options
param default:The primary button

The result field will always be called submit and will contain the pressed button text as a value.

If one of the custom options should be the preferred option, the default argument controls which one is highlighted with an accent color.

Examples

Add icon      Warning
Add heading   Delete user ${username}?
Add submit buttons    buttons=No,Yes    default=Yes
${result}=    Run dialog
IF   $result.submit == "Yes"
    Delete user    ${username}
END

Add Text

Add a text paragraph element, for larger bodies of text

Arguments

Argument Type Default value Description
textstrnullThe text content for the paragraph
sizeSizeMediumThe size of the text
param text:The text content for the paragraph
param size:The size of the text

Supported size values are Small, Medium, and Large. By default uses the value Medium.

Examples

Add heading   An error occurred
Add text      There was an error while requesting user information
Add text      ${error}   size=Small
Run dialog

Add Text Input

Add a text input element

Arguments

Argument Type Default value Description
namestrnullName of result field
labelstr, NoneNoneLabel for field
placeholderstr, NoneNonePlaceholder text in input field
validationCallable, NoneNoneValidation function for the input field
defaultstr, NoneNoneDefault value if the field wasn't completed
requiredboolFalseIf true, will display an error if not completed
param name:Name of result field
param label:Label for field
param placeholder:
 Placeholder text in input field
param validation:
 Validation function for the input field
param default:Default value if the field wasn't completed
param required:If true, will display an error if not completed

Adds a text field that can be filled by the user. The entered content will be available in the name field of the result.

For customizing the look of the input, the label text can be given to add a descriptive label and the placholder text can be given to act as an example of the input value.

The default value will be assigned to the input field if the user doesn't complete it. If provided, the placeholder won't be shown. This is None by default. Also, if a default value is provided and the user deletes it, None will be the corresponding value in the results dictionary.

Examples

Add heading    Send feedback
Add text input    email    label=E-mail address
Add text input    message
...    label=Feedback
...    placeholder=Enter feedback here
${result}=    Run dialog
Send feedback message    ${result.email}  ${result.message}

Ask User

Same as Run Dialog it will create a dialog from all the defined elements and block until the user has handled it. It will also add by default a submit and close buttons.

Arguments

Argument Type Default value Description
timeoutint180Time to wait for dialog to complete, in seconds
optionsAnynullOptions for the dialog
param timeout:Time to wait for dialog to complete, in seconds
param options:Options for the dialog

Returns a result object with all input values.

For more information about possible options for opening the dialog, see the documentation for the keyword Run Dialog.

Examples

Add heading     Please enter your username
Add text input  name=username
${result}=      Ask User
Log    The username is: ${result.username}

Clear Dialog

Clear dialog and results while it is running.

Close Column

Closes previously opened Column.

Raises LayoutError if called with no Column open, or if another layout element was opened more recently than a Column.

Close Container

Close previously opened container.

Raises LayoutError if called with no Row open, or if another layout element was opened more recently than a row.

Close Navbar

Close previously opened navbar.

Raises LayoutError if called with no Row open, or if another layout element was opened more recently than a row.

Close Row

Close previously opened row.

Raises LayoutError if called with no Row open, or if another layout element was opened more recently than a row.

Close Stack

Close previously opened Stack.

Raises LayoutError if called with no Stack open, or if another layout element was opened more recently than a Stack.

Open Column

Open a Column layout container. Following Add <element> calls will add items into that Column until Close Column is called.

*** Keywords ***
Double Column Layout
    Open Row
    Open Column
    Add Text      First item in the first column
    Add Text      Second item on the first column
    Close Column
    Open Column
    Add Text      First item on the second column
    Close Column
    Close Row

Open Container

Open a single element container. The following Add <element> calls adds an element inside the container. Can be used for styling elements.

Arguments

Argument Type Default value Description
marginint, None5How much margin to add around the container. RPA.Assistant adds by default a container of margin 5 around all elements, to have a smaller margin use containers with smaller margin value for elements.
paddingint, NoneNoneHow much padding to add around the content of the container.
widthint, NoneNoneWidth of the container.
heightint, NoneNoneHeight of the container.
background_colorstr, NoneNone
locationLocation, Tuple[int, int], NoneNoneWhere to place the container (A Location value or tuple of ints). Only works inside a Stack layout element. To use any Center___ or ___Center locations you must define width and height to the element.
param margin:

How much margin to add around the container. RPA.Assistant adds by default a container of margin 5 around all elements, to have a smaller margin use containers with smaller margin value for elements.

param padding:

How much padding to add around the content of the container.

param width:

Width of the container.

param height:

Height of the container.

param bgcolor:

Background color for the container. Default depends on icon. Allowed values are colors from [https://github.com/flet-dev/flet/blob/035b00104f782498d084c2fd7ee96132a542ab7f/sdk/python/packages/flet-core/src/flet_core/colors.py#L37|Flet Documentation] (in the format black12, red500) or ARGB/RGB (#FFXXYYZZ or #XXYYZZ).XXYYZZ

param location:

Where to place the container (A Location value or tuple of ints). Only works inside a Stack layout element.

To use any Center___ or ___Center locations you must define width and height to the element.

*** Keywords ***
Padded Element With Background
    Open Container  padding=20  background_color=blue500
    Add Text        sample text
    Close Container

Open Navbar

Create a Navigation Bar. Following Add <element> calls will add items into the Navbar until Close Navbar is called.

Arguments

Argument Type Default value Description
titlestr, NoneNone

Navbar doesn't clear when Clear Dialog is called.

Only one Navbar can be initialized at a time. Trying to make a second one will raise a LayoutError.

*** Keywords ***
    Go To Start Menu
        Add Heading  Start menu
        Add Text  Start menu content

    Assistant Navbar
        Open Navbar  title=Assistant
        Add Button   menu  Go To Start Menu
        Close Navbar

Open Row

Open a row layout container. Following Add <element> calls will add items into that row until Close Row is called.

*** Keywords ***
Side By Side Elements
    Open Row
    Add Text  First item on the row
    Add Text  Second item on the row
    Close Row

Open Stack

Create a "Stack" layout element. Stack can be used to position elements absolutely and to have overlapping elements in your layout. Use Container's top and left arguments to position the elements in a stack.

Arguments

Argument Type Default value Description
widthint, NoneNone
heightint, NoneNone
*** Keywords ***
    Absolutely Positioned Elements
        # Positioning containers with relative location values requires
        # absolute size for the Stack
        Open Stack  height=360  width=360

        Open Container  width=64  height=64  location=Center
        Add Text  center
        Close Container

        Open Container  width=64  height=64  location=TopRight
        Add Text  top right
        Close Container

        Open Container  width=64  height=64  location=BottomRight
        Add Text  bottom right
        Close Container

        Close Stack

Refresh Dialog

Can be used to update UI elements when adding elements while dialog is running

Run Dialog

Create a dialog from all the defined elements and block until the user has handled it.

Arguments

Argument Type Default value Description
timeoutint180Time to wait for dialog to complete, in seconds
titlestrAssistantTitle of dialog
heightint, typing.Literal['AUTO'][AUTO]AUTOHeight of dialog (in pixels or 'AUTO')
widthint480Width of dialog (in pixels)
on_topboolFalseShow dialog always on top of other windows
locationWindowLocation, Tuple[int, int], NoneNoneWhere to place the dialog (options are Center, TopLeft, or a tuple of ints)
param timeout:Time to wait for dialog to complete, in seconds
param title:Title of dialog
param height:Height of dialog (in pixels or 'AUTO')
param width:Width of dialog (in pixels)
param on_top:Show dialog always on top of other windows
param location:Where to place the dialog (options are Center, TopLeft, or a tuple of ints)

If the location argument is None it will let the operating system place the window.

Returns a result object with all input values.

When the dialog closes elements are cleared.

Examples

Add heading     Please enter your username
Add text input  name=username
${result}=      Run dialog
Log    The username is: ${result.username}

Set Title

Set dialog title when it is running.

Arguments

Argument Type Default value Description
titlestrnull