Keywords (135)

Introduction

FlaUILibrary is a Robot Framework library for automating Windows GUI.

It is a wrapper for FlaUI automation framework, which is based on native UI Automation libraries from Microsoft.

Getting started

FlaUILibrary uses XPath item identifiers to gain access to user interface components like windows, buttons, textbox etc.

Library screenshot usage

FlaUiLibrary contains by default an automatic snapshot module which creates for each error case a snapshot from an attached element or desktop. To disable this feature use Library screenshot_enabled=False.

Following settings could be used for library init.

Library screenshot_enabled=<True/False> screenshot_dir=<PATH_TO_STORE_IMAGES>

XPath locator

An XPath is a tree overview from all active module application like a Taskbar or Windows (Outlook, Security Client). FlaUILibrary supports to interact with this XPath to select this module components by a AutomationId, Name, ClassName or HelpText.

XPath identifier usage examples:

Attribute Description Example
AutomationId Search for element with given automation id /MenuBar/MenuItem[@AutomationId='<ID>']
Name Search for element with given name /MenuBar/MenuItem[@Name='<NAME>']
ClassName Search for element with given class type /MenuBar/MenuItem[@ClassName='<CLASS_NAME>']
HelpText Search for element with given help text /MenuBar/MenuItem[@HelpText='<HELP_TEXT>']

For FlaUI there is an inspector tool FlaUI Inspect to verify an XPath from all visible UI components. Download the latest release and set UIA3 Mode and enable 'Show XPath' under mode.

Importing

Arguments

uia
= UIA3
screenshot_on_failure
= True
screenshot_dir
= None
timeout
= 1000

Documentation

FlaUiLibrary can be imported by following optional arguments:

uia Microsoft UI-Automation framework to use. UIA2 or UIA3 screenshot_on_failure indicator to disable or enable screenshot feature. screenshot_dir is the directory where screenshots are saved. timeout maximum amount of waiting time in ms for an element find action. Default value is 1000ms. alias alias library name from import.

If the given directory does not already exist, it will be created when the first screenshot is taken. If the argument is not given, the default location for screenshots is the output directory of the Robot run, i.e. the directory where output and log files are generated.

Keywords

Arguments

name msg
= None

Documentation

Attach to a running application by name.

If application with name not exists an error message will be thrown.

Arguments:

Argument Type Description
name string Process name to attach
msg string Custom error message

Example:

${pid} Attach Application By Name <APPLICATION>
${pid} Attach Application By Name <APPLICATION> You shall not pass

Returns:

Process id from attached process if successfully

Arguments

pid msg
= None

Documentation

Attach to a running application by pid.

If application with pid not exists an error message will be thrown.

Arguments:

Argument Type Description
pid number Process identifier to attach
msg string Custom error message

Example:

${pid} Attach Application By PID <PID_NUMBER>
${pid} Attach Application By PID <PID_NUMBER> You shall not pass

Returns:

Process id from attached process if successfully

Arguments

identifier argb_color msg
= None

Documentation

Verification if background color is equal.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element
Color is not equal

Arguments:

Argument Type Description
identifier string XPath identifier from element
argb_color tuple ARGB color format (int, int, int, int)
msg string Custom error message

Example:

Background Color Should Be <XPATH> <COLOR_ARGB_TUPLE>

Arguments

identifier msg
= None

Documentation

Verifies if window can be maximized (True) if not False.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${result} Can Window Be Maximized <XPATH>

Arguments

identifier msg
= None

Documentation

Verifies if window can be minimized (True) if not False.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${result} Can Window Be Minimized <XPATH>

Arguments

identifier msg
= None

Documentation

Left click to element by an XPath.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Click <XPATH>

Arguments

click_element_identifier str close_element_identifier
= None
str | None focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_close
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_close
= True
bool msg
= None

Documentation

Left clicks an element by an XPath and excepts an element to be closed. It repeats the act of clicking until the excepted element is closed by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be clicked
close_element_identifier string XPath identifier from element to be closed after clicking click_element if not given the click_element_identifier will be set as default
focus_element_identifier_before_click string XPath identifier from element to be focused before clicking click_element
focus_element_identifier_after_close string XPath identifier from element to be focused after openning close_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already closed
msg string Custom error message

Examples:

Click Close <XPATH> <XPATH>

or

Click Close <XPATH>

Arguments

identifier hold_time
= 1000
msg
= None

Documentation

Left click and hold to element by XPath and release after timeout.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
hold_time int Holding time of click in ms
msg string Custom error message

Examples:

Click Hold <XPATH> 5000

Arguments

click_element_identifier str close_element_identifier
= None
str | None hold_time
= 1000
int focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_close
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_close
= True
bool msg
= None

Documentation

clicks and holds an element by an XPath and excepts an element to be closed. It repeats the act of middle clicking until the excepted element is closed by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be middle clicked
close_element_identifier string XPath identifier from element to be closed after middle clicking click_element if not given the click_element_identifier will be set as default
hold_time int Holding time of click in ms
focus_element_identifier_before_click string XPath identifier from element to be focused before middle clicking click_element
focus_element_identifier_after_close string XPath identifier from element to be focused after openning close_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already closed
msg string Custom error message

Examples:

Middle Click Close <XPATH> <XPATH>

or

Middle Click Close <XPATH>

Arguments

click_element_identifier str open_element_identifier str hold_time
= 1000
int focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_open
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_open
= True
bool msg
= None

Documentation

Left clicks to element by an XPath and excepts an element to be opened. It repeats the act of clicking until the excepted element is there by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be clicked
open_element_identifier string XPath identifier from element to be opened after clicking click_element
hold_time int Holding time of click in ms
focus_element_identifier_before_click string XPath identifier from element to be focused before clicking click_element
focus_element_identifier_after_open string XPath identifier from element to be focused after openning open_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already open
msg string Custom error message

Examples:

Click Open <XPATH> <XPATH>

Arguments

click_element_identifier str open_element_identifier str focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_open
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_open
= True
bool msg
= None

Documentation

Left clicks to element by an XPath and excepts an element to be opened. It repeats the act of clicking until the excepted element is there by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be clicked
open_element_identifier string XPath identifier from element to be opened after clicking click_element
focus_element_identifier_before_click string XPath identifier from element to be focused before clicking click_element
focus_element_identifier_after_open string XPath identifier from element to be focused after openning open_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already open
msg string Custom error message

Examples:

Click Open <XPATH> <XPATH>

Arguments

pid msg
= None

Documentation

Closes the attached application.

If no application is attached an error message will be thrown.

Arguments:

Argument Type Description
pid int Process id to close
msg string Custom error message

Example:

${pid} Launch Application <APPLICATION>
Close Application ${pid}

Arguments

name msg
= None

Documentation

Closes the attached application by name.

If no application is attached an error message will be thrown.

Arguments:

Argument Type Description
name       | string | Process name to close|
msg        | string | Custom error message |

Example:

Close Application By Name $[name}

Arguments

identifier msg
= None

Documentation

Try to close window from element.

Arguments:

Argument Type Description
identifier string XPath identifier from element to search
msg string Custom error message

Example:

Launch Application <APPLICATION>
Close Window <XPATH_TO_APPLICATION_WINDOW>

Arguments

identifier msg
= None

Documentation

Collapse every collapsable tree items of the given tree.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Collapse All TreeItems <XPATH>

Arguments

identifier msg
= None

Documentation

Collapse combobox.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Collapse Combobox <XPATH>

Arguments

identifier item msg
= None

Documentation

Collapses item from tree by hybrid pointers, series of indexes and names.

Tree item will be located using the following syntax: N:Name1->I:index2->N:Name3 Means in the root level of tree the item with name Name1 will be expanded. Under it will be taken the item with index of (int) index2 and expanded. Under it there is an item with name Name3 will be Collapsed.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
item string Hybrid solution
msg string Custom error message

Examples:

${item}= N:name1->N:name2->N:name3
Collapse TreeItem <XPATH> ${item}

Arguments

identifier name msg
= None

Documentation

Checks if Combobox contains an item

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string Name from item
msg string Custom error message

Examples:

Combobox Should Contain <XPATH> <NAME>

Arguments

identifier culture msg
= None

Documentation

Checks if element is in given culture. This keyword only works by UIA3. UIA2 contains currently a bug. See https://github.com/FlaUI/FlaUI/issues/554 for more information.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element is not in expected culture format
Element could not be found by xpath
Culture pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
culture string Culture to equalize
msg string Custom error message

Example:

Culture Should Be <XPATH> <CULTURE>

Arguments

identifier msg
= None

Documentation

Double click to element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Double Click <XPATH>

Arguments

click_element_identifier str close_element_identifier
= None
str | None focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_close
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_close
= True
bool msg
= None

Documentation

Double clicks an element by an XPath and excepts an element to be closed. It repeats the act of double clicking until the excepted element is closed by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be double clicked
close_element_identifier string XPath identifier from element to be closed after double clicking click_element if not given the click_element_identifier will be set as default
focus_element_identifier_before_click string XPath identifier from element to be focused before double clicking click_element
focus_element_identifier_after_close string XPath identifier from element to be focused after openning close_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already closed
msg string Custom error message

Examples:

Double Click Close <XPATH> <XPATH>

or

Double Click Close <XPATH>

Arguments

identifier hold_time
= 1000
msg
= None

Documentation

Double click and hold to element by XPath and release after timeout.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
hold_time int Holding time of click in ms
msg string Custom error message

Examples:

Double Click Hold <XPATH> 5000

Arguments

click_element_identifier str open_element_identifier str focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_open
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_open
= True
bool msg
= None

Documentation

Double clicks to element by an XPath and excepts an element to be opened. It repeats the act of double clicking until the excepted element is there by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be double clicked
open_element_identifier string XPath identifier from element to be opened after double clicking click_element
focus_element_identifier_before_click string XPath identifier from element to be focused before double clicking click_element
focus_element_identifier_after_open string XPath identifier from element to be focused after openning open_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already open
msg string Custom error message

Examples:

Double Click Open <XPATH> <XPATH>

Arguments

start_identifier end_identifier msg
= None

Documentation

Clicks and hold the item with start_identifier and drops it at item with end_identifier.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
start_identifier string XPath identifier of element which should be holded and draged from
end_identifier string XPath identifier of element which should be holded and draged to
msg string Custom error message

Examples:

Drag And Drop <XPATH> <XPATH>

Arguments

identifier msg
= None

Documentation

Checks if element is disabled.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not disabled

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Element Should Be Disabled <XPATH>

Arguments

identifier msg
= None

Documentation

Checks if element is enabled.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not enabled

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Element Should Be Enabled <XPATH>

Arguments

identifier msg
= None

Documentation

Checks if element is offscreen.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not offscreen

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Element Should Be Offscreen <XPATH>

Arguments

identifier use_exception
= True
msg
= None

Documentation

Checks if element exists. If element exists True will be returned otherwise False. If element could not be found by xpath False will be returned.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
use_exception | bool   | Indicator if an FlaUI exception should be called if element

could not be found by xpath |

msg string Custom error message

Example for custom result handling:

${RESULT} Element Should Exist <XPATH> ${FALSE}
Run Keyword If ${RESULT} == ${False}

Example if element will be shown after a click and takes a few seconds to open:

Click <XPATH>
Wait Until Keyword Succeeds 5x 10ms Element Should Exist <XPATH>

Arguments

identifier msg
= None

Documentation

Checks if element is not offscreen.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is offscreen

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Element Should Not Be Offscreen <XPATH>

Arguments

identifier use_exception
= True
msg
= None

Documentation

Checks if element exists. If element exists False will be returned otherwise True. If element could not be found by xpath True will be returned.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element <XPATH> exists

Arguments:

Argument Type Description
identifier string XPath identifier from element
use_exception | bool   | Indicator if an FlaUI exception should be called if element

could not be found by xpath |

msg string Custom error message

Example for custom result handling:

${RESULT} Element Should Not Exist <XPATH> ${FALSE}
Run Keyword If ${RESULT} == ${False}

Example if element will be shown after a click and takes a few seconds to open:

Click <XPATH>
Wait Until Keyword Succeeds 5x 10ms Element Should Not Exist <XPATH>

Arguments

identifier msg
= None

Documentation

Expands every expandable Tree items of the given tree.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Expand All TreeItems <XPATH>

Arguments

identifier msg
= None

Documentation

Expand combobox.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Expand Combobox <XPATH>

Arguments

identifier item msg
= None

Documentation

Expands item from tree by hybrid pointers, series of indexes and names.

Tree item will be located using the following syntax: N:Name1->I:index2->N:Name3 Means in the root level of tree the item with name Name1 will be expanded. Under it will be taken the item with index of (int) index2 and expanded. Under it there is an item with name Name3 will be expanded.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
item string Hybrid solution
msg string Custom error message

Examples:

${item}= N:name1->N:name2->N:name3
Expand TreeItem <XPATH> ${item}

Arguments

identifier msg
= None

Documentation

Find all elements from given xpath, Returns an AutomationElement list which contains properties to Xpath. If AutomationId, ClassName or Name is set. Xpath can be used by these values and will be returned.

Example usage AutomationElement
Xpath --> /Window[1]/Tab/TabItem[1]
AutomationId --> /Window[1]/Tab/TabItem[@AutomationId="SimpleControl"]
Name --> /Window[1]/Tab/TabItem[@Name="Simple Controls"]
ClassName --> /Window[1]/Tab/TabItem[@ClassName="TabItem"]

If any property is not set empty string value will be returned.

XPaths syntax is explained in XPath locator.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

${elements} Find All Elements <XPATH>
${Xpath} Set Variable ${element[0].Xpath}
${Id} Set Variable ${element[0].AutomationId}
${Name} Set Variable ${element[0].Name}
${ClassName} Set Variable ${element[0].ClassName}

Arguments

identifier msg
= None

Documentation

Try to focus element by given xpath.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Focus <XPATH>

Arguments

identifier font_name msg
= None

Documentation

Verification if font name is equal.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element
Font name is not equal

Arguments:

Argument Type Description
identifier string XPath identifier from element
font_name string Font name to equalize
msg string Custom error message

Example:

Font Name Should Be <XPATH> <FONT_NAME>

Arguments

identifier font_size msg
= None

Documentation

Verification if font size is equal.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element
Font size is not equal

Arguments:

Argument Type Description
identifier string XPath identifier from element
font_size float Font size as floating point value
msg string Custom error message

Example:

Font Size Should Be <XPATH> <FONT_SIZE_FLOATING_POINT>

Arguments

identifier font_weight msg
= None

Documentation

Verification if font weight is equal.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element
Font weight is not equal

Arguments:

Argument Type Description
identifier string XPath identifier from element
font_weight float Font weight as floating point value
msg string Custom error message

Example:

Font Weight Should Be <XPATH> <FONT_WEIGHT_FLOATING_POINT>

Arguments

identifier argb_color msg
= None

Documentation

Verification if foreground color is equal.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element
Color is not equal

Arguments:

Argument Type Description
identifier string XPath identifier from element
argb_color tuple ARGB color format (int, int, int, int)
msg string Custom error message

Example:

Foreground Color Should Be <XPATH> <COLOR_ARGB_TUPLE>

Arguments

identifier msg
= None

Documentation

Get all data from a grid as an array collection.

Includes all header values as first element from list.

For example data grid: [ [ "Value_1", "Value_2", "Value_3" ], [ "Data_1", "Data_2", "Data_3" ], ]

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${data} Get All Data From Grid <XPath>

Arguments

identifier msg
= None

Documentation

Get all names from a combobox as a list. If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from combobox element
msg string Custom error message

Examples:

${data} Get All Names From Combobox <XPATH> <MSG>

Arguments

identifier msg
= None

Documentation

Get all names from a listbox as a list. If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from listbox element
msg string Custom error message

Examples:

${data} Get All Names From Listbox <XPATH> <MSG>

Arguments

identifier msg
= None

Documentation

Get all selected items from combobox as list. If nothing is selected empty list will be returned.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${data} Get All Selected Names From Combobox <XPath>

Arguments

identifier msg
= None

Documentation

Get all selected items from combobox as list. If nothing is selected empty list will be returned.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${data} Get All Selected Texts From Combobox <XPath>

Arguments

identifier msg
= None

Documentation

Get all texts from a combobox as a list. If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from combobox element
msg string Custom error message

Examples:

${data} Get All Texts From Combobox <XPATH> <MSG>

Arguments

identifier msg
= None

Documentation

Get all texts from a listbox as a list. If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from listbox element
msg string Custom error message

Examples:

${data} Get All Texts From Listbox <XPATH> <MSG>

Arguments

identifier msg
= None

Documentation

Returns the count of every visible tree item.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get All Visible TreeItems Count <XPATH>
Should Be Equal ${COUNT} <TOTAL_COUNT_OF_VISIBLE_TREEITEMS>

Arguments

identifier msg
= None

Documentation

Returns a list of names of every visible tree item.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

@{LIST_OF_NAMES_OF_VISIBLE_TREEITEMS} Create List name1 name2 name3
${Name} Get All Visible TreeItems Names <XPATH>
Should Be Equal ${Name} ${LIST_OF_NAMES_OF_VISIBLE_TREEITEMS}

Arguments

identifier msg
= None

Documentation

Returns background color as ARGB Tuple (int, int, int, int) from element if background color pattern is supported.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element to receive background color property

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${color} Get Background Color <XPATH>

Arguments

identifier msg
= None

Documentation

Return actual checked state ${True} or ${False} from checkbox.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${value} Get Checkbox State <XPATH>
Should Be Equal ${value} ${False/True}

Returns:

<True> if checkbox is set otherwise <False>

Arguments

identifier msg
= None

Documentation

Gets full output from element and childs output. Information to print out are AutomationId, Name, ControlType and FrameworkId.

Example output ${CHILDS} <XPATH>

AutomationId:, Name:Warning, ControlType:dialog, FrameworkId:Win32
------> AutomationId:, Name:Warning, ControlType:pane, FrameworkId:Win32
------> AutomationId:1002, Name:, ControlType:document, FrameworkId:Win32
------> AutomationId:1, Name:OK, ControlType:button, FrameworkId:Win32
------> AutomationId:1009, Name:Do not display further messages, ControlType:check box, FrameworkId:Win32
------> AutomationId:1011, Name:Web protection, ControlType:text, FrameworkId:Win32

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${CHILDS} Get Childs From Element <XPATH>
Log <XPATH>

Arguments

identifier msg
= None

Documentation

Return actual count of items in combobox.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get Combobox Items Count <XPATH>
Should Be Equal ${value} ${COUNT}

Arguments

identifier msg
= None

Documentation

Get culture from given element. This keyword only works by UIA3. UIA2 contains currently a bug. See https://github.com/FlaUI/FlaUI/issues/554 for more information.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Culture pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

${culture} Get Culture <XPATH>

Arguments

identifier msg
= None

Documentation

Get font name from element.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element to receive font name property

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${font_name} Get Font Name <XPATH>

Arguments

identifier msg
= None

Documentation

Get font size as floating point value.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element to receive font size property

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${font_size} Get Font Size <XPATH>

Arguments

identifier msg
= None

Documentation

Get font weight as floating point value.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

${font_weight} Get Font Weight <XPATH>

Arguments

identifier msg
= None

Documentation

Returns foreground color as ARGB Tuple (int, int, int, int) from element if foreground color pattern is supported.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Document pattern is not supported by given element to receive foreground color property

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${color} Get Foreground Color <XPATH>

Arguments

identifier msg
= None

Documentation

Return count of columns from data grid.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get Grid Columns Count <XPATH>
Should Be Equal ${COUNT} <VALUE_TO_COMPARE>

Arguments

identifier msg
= None

Documentation

Return count of rows from data grid.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get Grid Rows Count <XPATH>
Should Be Equal ${COUNT} <VALUE_TO_COMPARE>

Arguments

identifier msg
= None

Documentation

Get header from a grid as an array collection.

Includes all header values as first element from list.

For example data grid: [ [ "Value_1", "Value_2", "Value_3" ], [ "Data_1", "Data_2", "Data_3" ], ]

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${data} Get Header From Grid <XPath>

Arguments

identifier msg
= None

Documentation

Return count of rows in listbox.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get Listbox Items Count <XPATH>
Should Be Equal ${COUNT} <VALUE_TO_COMPARE>

Arguments

identifier msg
= None

Documentation

Return name value from element.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${NAME} Get Name From Element <XPATH>

Returns:

Name from element if set otherwise empty string

Arguments

identifier action msg
= None

Documentation

Returns a supported property value from a given element if supported.

XPaths syntax is explained in XPath locator.

Supported operations:

Action Type Returns
BACKGROUND_COLOR Tuple (Numbers) (A,R,G,B)
FOREGROUND_COLOR Tuple (Numbers) (A,R,G,B)
FONT_SIZE Number Font size
FONT_NAME String Font name
FONT_WEIGHT Float Font weight
CULTURE String Iso Culture
WINDOW_VISUAL_STATE String "Normal", "Maximized", "Minimized"
WINDOW_INTERACTION_STATE String "Running", "Closing", "ReadyForUserInteraction", "BlockedByModalWindow", "NotResponding"
TOGGLE_STATE String "ON", "OFF", "Indeterminate"
CAN_WINDOW_MINIMIZE Bool True or False
CAN_WINDOW_MAXIMIZE Bool True or False
IS_READ_ONLY Bool True or False
IS_WINDOW_PATTERN_SUPPORTED Bool True or False
IS_TEXT_PATTERN_SUPPORTED Bool True or False
IS_TOGGLE_PATTERN_SUPPORTED Bool True or False
IS_VALUE_PATTERN_SUPPORTED Bool True or False
IS_RANGEVALUE_PATTERN_SUPPORTED Bool True or False
VALUE String The Value Property of Element
RANGEVALUE String The RangeValue Value Property of Element
RANGEMINIMUM String The RangeValue Minimum Property of Element
RANGEMAXIMUM String The RangeValue Maximum Property of Element
IS_EXPAND_COLLAPSE_PATTERN_SUPPORTED Bool True or False
EXPAND_COLLAPSE_STATE String Collapsed or Expanded
IS_SELECTION_ITEM_PATTERN_SUPPORTED Bool True or False
IS_SELECTED Bool True or False

Possible FlaUI-Errors:

Element could not be found by xpath
Pattern is not supported by given element
Action is not supported
Try to execute a setter property

Arguments:

Argument Type Description
identifier string XPath identifier from element
action string Action to receive property
msg string Custom error message

Examples:

${value} Get Property From Element <XPATH> <PROPERTY>

Arguments

identifier msg
= None

Documentation

Return actual state ${True} or ${False} from radiobutton.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${value} Get Radiobutton State <XPATH>
Should Be Equal ${value} ${False/True}

Arguments

identifier msg
= None

Documentation

Return rectangle value from element.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

@{Rectangle} Get Rectangle Bounding From Element <XPATH>

Returns:

An array Rectangle Bounding from element : [rect.X, rect.Y, rect.Width, rect.Height]|

Arguments

identifier msg
= None

Documentation

Return count of items in the first level of the tree.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${COUNT} Get Root TreeItems Count <XPATH>
Should Be Equal ${COUNT} <VALUE_TO_COMPARE>

Documentation

Returns the current logging mode of the screenshot module. Default is 'File'.

Example:

${log_mode} Get Screenshot Log Mode

Arguments

identifier msg
= None

Documentation

Get all selected rows as string. Representation for each cell is a pipe. If nothing is selected empty string will be returned.

For example:

Value_1 Value_2 Value_3

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${data} Get Selected Grid Rows <XPath>

Arguments

identifier msg
= None

Documentation

Selects item from tree with given index number

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${Name} Get Selected Treeitems Name ${XPATH_TREE}
Should Be Equal ${Name} <Name>

Arguments

identifier msg
= None

Documentation

Return child TabItems names from the parent Tab element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

@{CHILD_TAB_ITEMS} Get Tab Items Names <XPATH>

Returns:

List<String> child TabItem elements names from the Tab element.

Arguments

identifier msg
= None

Documentation

Return text from textbox element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
name string XPath identifier from element
msg string Custom error message

Examples:

${TEXT} Get Text From Textbox <XPATH>

Returns:

Text string from textbox

Arguments

identifier msg
= None

Documentation

Get Toggle State as string. Possible states are "ON", "OFF", "Indeterminate"

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Toggle pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${toggle_state} Get Toggle State <XPATH>

Documentation

Gets given Windows User Automation Identifier which is in usage for the test.

Possible Identifier are : UIA2 or UIA3

Examples:

${IDENTIFIER} Get UIA Identifier
Log <IDENTIFIER>

Arguments

identifier msg
= None

Documentation

Get Windows Interaction State as string.

Possible states are:

"Running" - The window is running. This does not guarantee that the window is ready for user interaction or is responding.

"Closing" - The window is closing.

"ReadyForUserInteraction" - The window is ready for user interaction.

"BlockedByModalWindow" - The window is blocked by a modal window.

"NotResponding" - The window is not responding.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${state} Get Window Interaction State <XPATH>

Arguments

identifier msg
= None

Documentation

Get Windows Visual State as string. Possible states are "Normal", "Maximized", "Minimized"

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${state} Get Window Visual State <XPATH>

Arguments

identifier msg
= None

Documentation

Invokes the invokable element given by identifier. If button could not be found by xpath False will be returned.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Element is not invokable
Action not supported

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Invoke Button <XPATH> msg=Custom error message

Arguments

identifier msg
= None

Documentation

Verifies if element is enabled (true) or not (false).

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

${IS_ENABLED} = Is Element Enabled <XPATH>

Returns:

<True> if element is enabled otherwise <False>

Arguments

identifier msg
= None

Documentation

Checks if element is offscreen (true) or not (false).

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

${IS_OFFSCREEN} Is Element Offscreen <XPATH>

Arguments

identifier msg
= None

Documentation

Verification if element is hidden. Returns True if element is Hidden otherwise False.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Text pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${is_element_hidden} Is Hidden <XPATH>

Arguments

identifier msg
= None

Documentation

Verification if element is visible. Return True if Element is Visible otherwise False.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Text pattern is not supported by given element

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

${is_element_visible} Is Visible <XPATH>

Arguments

application msg
= None

Documentation

Launches an application.

If application could not be found an error message will be thrown.

Arguments:

Argument Type Description
application string Relative or absolute path to executable to launch
msg string Custom error message

Example:

${pid} Launch Application <APPLICATION>

Returns:

Process id from started process if successfully

Arguments

application arguments msg
= None

Documentation

Launches an application with given arguments.

If application could not be found an error message will be thrown.

Arguments:

Argument Type Description
application string Relative or absolute path to executable to launch
arguments string Arguments for application to start
msg string Custom error message

Example:

${pid} Launch Application With Args <APPLICATION> <ARGUMENTS>

Returns:

Process id from started process if successfully

Arguments

identifier item msg
= None

Documentation

Checks if the selected listbox items are same with the given ones.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
item several strings Name of items
msg string Custom error message

Examples:

Listbox Selection Should Be <XPATH> <STRING>

Arguments

identifier name msg
= None

Documentation

Checks if listbox contains the given item.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string Name of item
msg string Custom error message

Examples:

Listbox Should Contain <XPATH> <STRING>

Arguments

identifier name msg
= None

Documentation

Checks if listbox does not contain the given item.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string Name of item
msg string Custom error message

Examples:

Listbox Should Not Contain <XPATH> <STRING>

Arguments

identifier msg
= None

Documentation

Maximize given window if supported.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element
Window could not be maximized

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Maximize Window <XPATH>

Arguments

identifier msg
= None

Documentation

Middle click to element by an XPath.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Middle Click <XPATH>

Arguments

click_element_identifier str close_element_identifier
= None
str | None focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_close
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_close
= True
bool msg
= None

Documentation

Middle clicks an element by an XPath and excepts an element to be closed. It repeats the act of middle clicking until the excepted element is closed by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be middle clicked
close_element_identifier string XPath identifier from element to be closed after middle clicking click_element if not given the click_element_identifier will be set as default
focus_element_identifier_before_click string XPath identifier from element to be focused before middle clicking click_element
focus_element_identifier_after_close string XPath identifier from element to be focused after openning close_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already closed
msg string Custom error message

Examples:

Middle Click Close <XPATH> <XPATH>

or

Middle Click Close <XPATH>

Arguments

identifier hold_time
= 1000
msg
= None

Documentation

Left click and hold to element by XPath and release after timeout.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
hold_time int Holding time of click in ms
msg string Custom error message

Examples:

Middle Click Hold <XPATH> 5000

Arguments

click_element_identifier str open_element_identifier str focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_open
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_open
= True
bool msg
= None

Documentation

Middle clicks to element by an XPath and excepts an element to be opened. It repeats the act of middle clicking until the excepted element is there by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be middle clicked
open_element_identifier string XPath identifier from element to be opened after middle clicking click_element
focus_element_identifier_before_click string XPath identifier from element to be focused before middle clicking click_element
focus_element_identifier_after_open string XPath identifier from element to be focused after openning open_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already open
msg string Custom error message

Examples:

Middle Click Open <XPATH> <XPATH>

Arguments

identifier msg
= None

Documentation

Minimize given window if supported.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element
Window could not be minimized

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Minimize Window <XPATH>

Arguments

identifier msg
= None

Documentation

Move mouse cursor to given element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Move To <XPATH>

Arguments

name identifier msg
= None

Documentation

Verifies if element name contains to name.

Possible FlaUI-Errors:

Element could not be found by xpath
Name from element <XPATH> does not contain <NAME>

Arguments:

Argument Type Description
name string Name to compare
identifier string XPath identifier from element
msg string Custom error message

Example:

Name Contains Text <NAME> <XPATH>

Arguments

name identifier msg
= None

Documentation

Verifies if name from element is equal.

Possible FlaUI-Errors:

Element could not be found by xpath
Name from element <XPATH> is not equals to <NAME>

Arguments:

Argument Type Description
name string Name to compare
identifier string XPath identifier from element
msg string Custom error message

Example:

Name Should Be <NAME> <XPATH>

Arguments

identifier msg
= None

Documentation

Normalize given window if supported.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element
Window could not be normalized

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Normalize Window <XPATH>

Arguments

key_combination identifier
= None
delay_in_ms
= None
msg
= None
press_only
= False
release_only
= False

Documentation

Keyboard control to execute a user defined one shortcut or text. press_only and release_only supports key shortcut only, not text.

Arguments:

Argument Type Description
keys_combination List of Strings, which should Text to be typed by keyboard
satisfy one of the following formats:
- s'<shortcut>'
- t'<text>'
Examples:
- s'CTRL+A'
- t'JJJ'
- s'JJJ' will be executed as text
identifier String *Optional XPath identifier
delay_in_ms Number *Optional Delay to wait until keyword succeeds in ms
msg String *Optional Custom error message
press_only Bool *Optional Send key press event only
release_only Bool *Optional Send key release event only

XPath syntax is explained in XPath locator.

The following keys are supported for usage as a part of key_combination:

LBUTTON Left mouse button
RBUTTON Right mouse button
CANCEL Control-break processing
MBUTTON Middle mouse button (three-button mouse)
XBUTTON1 Windows 2000/XP: X1 mouse button
XBUTTON2 Windows 2000/XP: X2 mouse button
BACK BACKSPACE key
TAB TAB key
CLEAR CLEAR key
ENTER ENTER key
SHIFT SHIFT key
CTRL CTRL key
ALT ALT key
CAPITAL CAPITAL key
PAUSE PAUSE key
ESCAPE ESC key
ESC ESC key
SPACE Blank space key
NEXT Next key
END END key
HOME HOME key
LEFT LEFT ARROW key
RIGHT RIGHT ARROW key
UP UP ARROW key
DOWN DOWN ARROW key
SELECT SELECT key
PRINT PRINT key
EXECUTE EXEC key
INSERT INS key
DELETE DEL key
HELP HELP key
0 - 9
A - Z
F1 - F12
LWIN Left Windows key
RWIN Right Windows key
APPS
SLEEP
MULTIPLY '*' key
ADD '+' key
SEPARATOR
SUBTRACT
DECIMAL
DIVIDE

Example:

*** Variables ***
${KEYBOARD_INPUT_CUT} s'CTRL+X'
*** Test Cases ***
...Keyboard usage in Test Case...
Press Key s'CTRL' ${XPATH_COMBO_BOX_INPUT}
Press Key t'A' ${XPATH_COMBO_BOX_INPUT}
Press Key s'CTRL+A' ${XPATH_COMBO_BOX_INPUT}
Press Key ${KEYBOARD_INPUT_CUT} ${XPATH_COMBO_BOX_INPUT}
Press Key ${KEYBOARD_INPUT_CUT} ${XPATH_COMBO_BOX_INPUT} 500

Arguments

keys_combinations identifier
= None
delay_in_ms
= None
msg
= None
press_only
= False
release_only
= False

Documentation

Keyboard control to execute a user defined sequence of shortcuts and text values. If identifier set try to attach to given element if operation was successfully old element will be reattached automatically. press_only and release_only supports key shortcut only, not text.

Arguments:

Argument Type Description
keys_combination List of Strings, which should Text to be typed by keyboard
satisfy one of the following formats:
- s'<shortcut>'
- t'<text>'
Examples:
- s'CTRL+A'
- t'JJJ'
- s'JJJ' will be executed as text
identifier String *Optional Optional XPath identifier
delay_in_ms Number *Optional Delay to wait until keyword succeeds in ms
msg String *Optional Custom error message
press_only Bool *Optional Send key press event only
release_only Bool *Optional Send key release event only

XPath syntax is explained in XPath locator.

The list of all key_combinations can be seen under Press Key keyword. The only difference between both keywords is: Press Keys supports a sequence of several to be pressed after each other Press Key supports can only press one key combination at a time

Example:

*** Variables ***
@{KEYBOARD_INPUT_SELECT_CUT_TEXT} s'CTRL+A' s'CTRL+X'
*** Test Cases ***
Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} ${XPATH_COMBO_BOX_INPUT}
Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} ${XPATH_COMBO_BOX_INPUT} 500

Arguments

identifier msg
= None

Documentation

Right click to element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Right Click <XPATH>

Arguments

click_element_identifier str close_element_identifier
= None
str | None focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_close
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_close
= True
bool msg
= None

Documentation

Right clicks an element by an XPath and excepts an element to be closed. It repeats the act of right clicking until the excepted element is closed by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be right clicked
close_element_identifier string XPath identifier from element to be closed after right clicking click_element if not given the click_element_identifier will be set as default
focus_element_identifier_before_click string XPath identifier from element to be focused before right clicking click_element
focus_element_identifier_after_close string XPath identifier from element to be focused after openning close_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already closed
msg string Custom error message

Examples:

Right Click Close <XPATH> <XPATH>

or

Right Click Close <XPATH>

Arguments

identifier hold_time
= 1000
msg
= None

Documentation

Right click and hold to element by XPath and release after timeout.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
hold_time int Holding time of click in ms
msg string Custom error message

Examples:

Right Click Hold <XPATH> 5000

Arguments

click_element_identifier str open_element_identifier str focus_element_identifier_before_click
= None
str | None focus_element_identifier_after_open
= None
str | None max_repeat
= 5
int timeout_between_repeates
= 1000
int ignore_if_already_open
= True
bool msg
= None

Documentation

Right clicks to element by an XPath and excepts an element to be opened. It repeats the act of right clicking until the excepted element is there by waiting for given seconds each time. Maximum repeating time could also be changed

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
click_element_identifier string XPath identifier from element to be right clicked
open_element_identifier string XPath identifier from element to be opened after right clicking click_element
focus_element_identifier_before_click string XPath identifier from element to be focused before right clicking click_element
focus_element_identifier_after_open string XPath identifier from element to be focused after openning open_element
max_repeat int Maximum number of tries
timeout_between_repeates int wait time in milli seconds in between every try
ignore_if_already_open bool the keyword will not be executed if excepted element is already open
msg string Custom error message

Examples:

Right Click Open <XPATH> <XPATH>

Arguments

identifier amount if_focus
= True
msg
= None

Documentation

Scroll mouse wheel down to element by an XPath.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
amount string Scroll amount
if_focus bool Whether to focus element before scroll
msg string Custom error message

Examples:

Scroll Down <XPATH> 1

Arguments

identifier amount if_focus
= True
msg
= None

Documentation

Scroll mouse wheel up to element by an XPath.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
amount string Scroll amount
if_focus bool Whether to focus element before scroll
msg string Custom error message

Examples:

Scroll Up <XPATH> 10

Arguments

identifier index msg
= None

Documentation

Selects item from combobox with given index number. Combobox will be automatic collapsed after selection is done.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
index string index of item
msg string Custom error message

Examples:

Select Combobox Item By Index <XPATH> <INDEX>

Arguments

identifier name msg
= None

Documentation

Selects item from combobox with given name. Combobox will be automatic collapsed after selection is done.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string name of item to select
msg string Custom error message

Examples:

Select Combobox Item By Name <XPATH> <NAME>

Arguments

identifier index multiselect
= True
msg
= None

Documentation

Select rows from data grid with the given index.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
index string IndexNumber
multiselect bool Multiselect availble or not
msg string Custom error message

Examples:

Select Grid Row By Index <XPath> <INDEX>

Arguments

identifier index name multiselect
= True
msg
= None

Documentation

Select specific row by name from data grid.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
index string Column IndexNumber
name string Column items Name
multiselect bool Multiselect availble or not
msg string Custom error message

Examples:

Select Grid Row By Name <XPath> <INDEX>

Arguments

identifier index msg
= None

Documentation

Selects item from listbox with given index number

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
index string index of item
msg string Custom error message

Examples:

Select Listbox Item By Index <XPATH> <INDEX>

Arguments

identifier name msg
= None

Documentation

Selects item from listbox by name.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string name from item
msg string Custom error message

Examples:

Select Listbox Item By Name <XPATH> <NAME>

Arguments

identifier msg
= None

Documentation

Select given radiobutton by xpath.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Select Radiobutton <XPATH>

Arguments

identifier name msg
= None

Documentation

Return child TabItems names from the parent Tab element.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string Name from tab to select
msg string Custom error message

Examples:

Select Tab Item By Name <XPATH> <NAME>

Arguments

identifier item msg
= None

Documentation

Selects item from tree by hybrid pointers, series of indexes and names.

Tree item will be located using the following syntax: N:Name1->I:index2->N:Name3 Means in the root level of tree the item with name Name1 will be expanded. Under it will be taken the item with index of (int) index2 and expanded. Under it there is an item with name Name3 will be selected.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
item string Hybrid solution
msg string Custom error message

Examples:

${item}= N:name1->N:name2->N:name3
Select TreeItem <XPATH> ${item}

Arguments

identifier name msg
= None

Documentation

Selects item from tree by name. If the given name could not be found or was not visible in tree FlauiError will be thrown.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string name from item
msg string Custom error message

Examples:

Select visible TreeItem By Name <XPATH> <NAME>

Arguments

identifier item msg
= None

Documentation

Checks if the selected tree items are same with the given ones.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
item string Name of treeitem
msg string Custom error message

Examples:

Selected TreeItem Should Be <XPATH> <item>

Arguments

identifier value msg
= None

Documentation

Set checkbox state to ${True} or ${False}

XPath syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
enable bool ${True} / ${False}
msg string Custom error message

Examples:

Set Checkbox State <XPATH> ${True/False}

Arguments

directory
= None

Documentation

Set directory for captured images. If no directory is set default output directory will be used from robot.

Arguments:

Argument Type Description
directory string Relative or absolute path to directory folder

Example:

Set Screenshot Directory <STRING_PATH>

Arguments

log_mode str

Documentation

Sets the logging mode of the screenshot module. Default is 'File'. Mode 'File' logs screenshots as files in the screenshot directory. Mode 'Base64' logs screenshots as base64 encoded strings embedded in the test report.

Arguments:

Argument Type Description
log_mode string File Base64

Example:

Set Screenshot Log Mode Base64

Arguments

identifier value msg
= None

Documentation

Inputs value to a textbox module.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from textbox
value string Value to set to textbox
msg string Custom error message

Examples:

Set Text To Textbox <XPATH> <VALUE>

Arguments

seperator msg
= None

Documentation

Sets specific tree item seperator to split.

XPaths syntax is explained in XPath locator.

Arguments:

Argument Type Description
seperator string Seperator to set to split up

Examples:

Set Tree Item Seperator <seperator>

Arguments

uia

Documentation

Switch automation user interface from library.

Possible arguments are 'UIA2' or 'UIA3'.

All other interface usage will force a Rush Exception.

Arguments:

Argument Type Description
uia string 'UIA2' or 'UIA3'

Example:

Switch UIA To UIA2
Switch UIA To UIA3

Arguments

identifier
= None
msg
= None

Documentation

Takes a screenshot of the whole desktop or the element, from the optionally provided identifier. Returns screenshot depending on log mode. Screenshot mode File -> returns filepath Screenshot mode Base64 -> returns encoded base64 string of image

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Example:

Take Screenshot
Take Screenshot <XPATH>
Take Screenshot <XPATH> "Your custom error message"

Arguments

enabled

Documentation

Takes a screenshot of the whole desktop if no element is attached otherwise attached element will be captured. Returns path to the screenshot file.

Arguments:

Argument Type Description
enabled string True or False

Example:

Take Screenshots On Failure ${FALSE/TRUE}

Arguments

identifier msg
= None

Documentation

Toggle given element.

If pattern is not supported a Not Supported Exception will be called.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
msg string Custom error message

Examples:

Toggle <XPATH>

Arguments

identifier state msg
= None

Documentation

Verification if element is in expected toggle state.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Toggle pattern is not supported by given element
Toggle state is not equal to given state

Arguments:

Argument Type Description
identifier string XPath identifier from element
state string Possible states are "ON", "OFF", "Indeterminate"
msg string Custom error message

Examples:

Toggle State Should Be <XPATH> <STATE>

Arguments

identifier name msg
= None

Documentation

Iterates every visible tree item. And fails if a node does not contain by given name.

XPaths syntax is explained in XPath locator.

If element could not be found by xpath an error message will be thrown.

Arguments:

Argument Type Description
identifier string XPath identifier from element
name string Name of treeitem
msg string Custom error message

Examples:

TreeItem Should Be Visible <XPATH> <Name>

Arguments

name timeout
= None
msg
= None

Documentation

Wait for application handle until timeout is reached.

Arguments:

Argument Type Description
name string Name from application to wait
timeout number Timeout to wait in milliseconds. If timeout is not set INFINITY will be used
msg string Custom error message

Example:

Wait For Application Handle By Name <NAME> <TIMEOUT>

Raise FlaUiError:

If application could not be found by name.

Returns:

True a main window handle was found, false otherwise

Arguments

pid timeout
= None
msg
= None

Documentation

Wait for application handle until timeout is reached.

Arguments:

Argument Type Description
pid number PID from application to wait
timeout number Timeout to wait in milliseconds. If timeout is not set INFINITY will be used
msg string Custom error message

Example:

Wait For Application Handle By Pid <PID> <TIMEOUT>

Raise FlaUiError:

If application could not be found by pid.

Returns:

True a main window handle was found, false otherwise

Arguments

name timeout
= None
msg
= None

Documentation

Wait for application when in busy state until timeout is reached.

Arguments:

Argument Type Description
name string Name from application to wait
timeout number Timeout to wait in milliseconds. If timeout is not set INFINITY will be used
msg string Custom error message

Example:

Wait For Application While Busy By Name <NAME> <TIMEOUT>

Raise FlaUiError:

If application could not be found by name.

Returns:

True if the application is idle, false otherwise

Arguments

pid timeout
= None
msg
= None

Documentation

Wait for application when in busy state until timeout is reached.

Arguments:

Argument Type Description
pid number PID from application to wait
timeout number Timeout to wait in milliseconds. If timeout is not set INFINITY will be used
msg string Custom error message

Example:

Wait For Application While Busy By Pid <PID> <TIMEOUT>

Raise FlaUiError:

If application could not be found by name.

Returns:

True if the application is idle, false otherwise

Arguments

identifier retries
= 10
msg
= None

Documentation

Waits until element does not exist or timeout was reached. If timeout was reached an FlaUIError occurred.

XPaths syntax is explained in XPath locator. Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not enabled

Arguments:

Argument Type Description
identifier string XPath identifier from element
retries number Maximum amount of retries per seconds to wait. By default, 10 retries.
msg string Custom error message

Example:

Wait Until Element Does Not Exist <XPATH> <RETRIES=10>
Wait Until Element Does Not Exist <XPATH> <RETRIES=10> <MSG>

Arguments

identifier retries
= 10
msg
= None

Documentation

Waits until element exist or timeout was reached. If timeout was reached an FlaUIError occurred.

XPaths syntax is explained in XPath locator. Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not enabled

Arguments:

Argument Type Description
identifier string XPath identifier from element
retries number Maximum amount of retries per seconds to wait. By default, 10 retries.
msg string Custom error message

Example:

Wait Until Element Exist <XPATH> <RETRIES=10>
Wait Until Element Exist <XPATH> <RETRIES=10> <MSG>

Arguments

identifier retries
= 10
msg
= None

Documentation

Waits until element is enabled or timeout was reached. If timeout was reached an FlaUIError occurred.

XPaths syntax is explained in XPath locator. Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is not enabled

Arguments:

Argument Type Description
identifier string XPath identifier from element
retries number Maximum amount of retries per seconds to wait. By default, 10 retries.
msg string Custom error message

Example:

Wait Until Element Is Enabled <XPATH> <RETRIES=10>
Wait Until Element Is Enabled <XPATH> <RETRIES=10> <MSG>

Arguments

identifier retries
= 10
msg
= None

Documentation

Waits until element is offscreen or timeout was reached. If timeout was reached an FlaUIError occurred.

Possible FlaUI-Errors:

Element could not be found by xpath
Element <XPATH> is visible

Arguments:

Argument Type Description
identifier string XPath identifier from element
retries number Maximum amount of retries per seconds to wait. By default, 10 retries.
msg string Custom error message

Example:

Wait Until Element Is Offscreen <XPATH> <RETRIES=10>
Wait Until Element Is Offscreen <XPATH> <RETRIES=10> <MSG>

Arguments

identifier state msg
= None

Documentation

Verification if window is in given window interaction state.

Possible states are:

"Running" - The window is running. This does not guarantee that the window is ready for user interaction or is responding.

"Closing" - The window is closing.

"ReadyForUserInteraction" - The window is ready for user interaction.

"BlockedByModalWindow" - The window is blocked by a modal window.

"NotResponding" - The window is not responding.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element
Visual state is not equal to given state

Arguments:

Argument Type Description
identifier string XPath identifier from element
state string Possible states are "Running", "Closing", "ReadyForUserInteraction", "BlockedByModalWindow", "NotResponding"
msg string Custom error message

Examples:

Window Interaction State Should Be <XPATH> <STATE>

Arguments

identifier state msg
= None

Documentation

Verification if window is in given window visual state.

XPaths syntax is explained in XPath locator.

Possible FlaUI-Errors:

Element could not be found by xpath
Window pattern is not supported by given element
Visual state is not equal to given state

Arguments:

Argument Type Description
identifier string XPath identifier from element
state string Possible states are "Normal", "Maximized", "Minimized"
msg string Custom error message

Examples:

Window Visual State Should Be <XPATH> <STATE>

Data types

boolean (Standard)

Documentation

Strings TRUE, YES, ON and 1 are converted to Boolean True, the empty string as well as strings FALSE, NO, OFF and 0 are converted to Boolean False, and the string NONE is converted to the Python None object. Other strings and other accepted values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive.

Examples: TRUE (converted to True), off (converted to False), example (used as-is)

Converted Types

  • string
  • integer
  • float
  • None

integer (Standard)

Documentation

Conversion is done using Python's int built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, 1.0 is accepted and 1.1 is not.

Starting from RF 4.1, it is possible to use hexadecimal, octal and binary numbers by prefixing values with 0x, 0o and 0b, respectively.

Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes.

Examples: 42, -1, 0b1010, 10 000 000, 0xBAD_C0FFEE

Converted Types

  • string
  • float

None (Standard)

Documentation

String NONE (case-insensitive) is converted to Python None object. Other values cause an error.

Converted Types

  • string

string (Standard)

FlaUILibrary

image/svg+xml