Library version: | 3.4.0 |
---|---|
Library scope: | GLOBAL |
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.
FlaUILibrary uses XPath item identifiers to gain access to user interface components like windows, buttons, textbox etc.
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>
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.
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.
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.
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 |
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 |
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> |
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> |
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> |
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> |
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> |
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 |
timeout_in_ms | int | Holding time in ms |
msg | string | Custom error message |
Examples:
Click Hold <XPATH> 5000 |
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> |
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} |
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} |
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> |
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> |
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> |
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} |
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> |
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> |
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> |
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> |
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 |
timeout_in_ms | int | Holding time in ms |
msg | string | Custom error message |
Examples:
Double Click Hold <XPATH> 5000 |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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} |
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} |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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} |
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> |
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> |
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> |
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} |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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 |
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 |
VALUE | String | The Value 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> |
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} |
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]|
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> |
Returns the current logging mode of the screenshot module. Default is 'File'.
Example:
${log_mode} = | Get Screenshot Log Mode |
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> |
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> |
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. |
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 |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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 |
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 |
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> |
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> |
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> |
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> |
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> |
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> |
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 |
timeout_in_ms | int | Holding time in ms |
msg | string | Custom error message |
Examples:
Middle Click Hold <XPATH> 5000 |
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> |
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> |
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> |
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> |
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> |
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> |
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 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 |
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 |
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> |
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> |
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 |
timeout_in_ms | int | Holding time in ms |
msg | string | Custom error message |
Examples:
Right Click Hold <XPATH> 5000 |
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> |
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 |
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 |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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} |
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> |
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> |
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} |
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> |
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 |
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> |
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> |
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 |
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" |
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} |
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> |
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> |
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> |
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 |
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 |
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 |
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 |
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> |
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> |
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> |
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> |
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> |
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> |
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)
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
String NONE
(case-insensitive) is converted to Python None
object. Other values cause an error.
All arguments are converted to Unicode strings.