Introduction

QVision Robot Framework library.

Collect all available keywords from the keyword libraries.

Importing

Arguments

ocr_engine
= None
** kwargs

Documentation

Initialize self. See help(type(self)) for accurate signature.

Keywords

Arguments

header ๐Ÿท timeout
= None

Documentation

Activate and focus a window

Activate the given window and show it on foreground. Works on Windows OS only.

Parameters

header :
Application window header or windows class name.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.

Examples

ActivateWindow     Word

Arguments

keyword * args

Documentation

Appstate is a pre-condition of a test case.

Appstate is a PaceWords convention of setting the application under test to a correct, known state. Appstate simply executes the provided Robot Framework keyword. The keyword could be called directly as well. Appstate makes it explicit that the test scripts follow the convention of explicitly declaring the starting state of each test case.

Examples

# Assuming user has implemented a Login keyword
Appstate       Login
# With arguments
Appstate       Login    username   password

Parameters

keyword : str
Keyword to execute
args
Possible args for the keyword

Documentation

Clear field

Clears the currently active UI field.

Examples

ClearField

Arguments

row_text
= None
col_text
= None
anchor
= None
๐Ÿท row_anchor
= None
๐Ÿท row_index
= None
๐Ÿท row_dist
= None
๐Ÿท col_anchor
= None
๐Ÿท col_index
= None
๐Ÿท col_dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Click cell based on row and column

Clicks the crossing defined by row and column texts

Parameters

row_text : str, optional
Text defining the row.
col_text : str, optional
Text defining the col.
anchor : str, optional
Anchor text for row and/or col texts
row_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
col_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
row_index : int, optional
Index of row text.
col_index : int, optional
Index of col text.
row_dist : float, optional
Maximum distance from the row anchor in widths of the anchor element. Value 1 means one anchor width away from the row anchor.
col_dist : float, optional
Maximum distance from the col anchor in widths of the anchor element. Value 1 means one anchor width away from the col anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When row or col texts could not be found.

Examples

ClickCell       Row 1        Finished

Arguments

label
= None
value
= None
anchor
= None
index
= None
dist
= None
๐Ÿท elem_index
= None
๐Ÿท threshold
= 0.8
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Click checkbox on the screen

Finds the checkbox on the screen and clicks it.

Parameters

label : str, optional
Checkbox label text.
value : {'checked', 'unchecked', 'on', 'off'}
Value to set for the checkbox. Value 'on' is the same as 'checked'.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

elem_index : int, optional
Index of the checkbox.
threshold : float, optional
Adjust the threshold in (0, 1] for determining if checkbox was checked.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click position
None
If nothing was clicked

Raises

KeywordFailException
When label is not found

Notes

This keyword is experimental. This means that it may not yet work properly in many cases and its signature may change in future versions.

Examples

*** Keywords ***
Examples
    ClickCheckbox    Register
    ClickCheckbox    Register    checked
    ClickCheckbox    Register    unchecked

Arguments

icon ๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Click icon

Click an icon on the screen.

Parameters

icon : str
Colon separated list of overlapping images

Returns

tuple
The (x, y) position.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

ClickIcon    ok
ClickIcon    ok    tol=0.5

Arguments

text icon_to_click ๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Click text until another text appears

Repeatedly click text_to_click until text is visible on the screen.

Parameters

text : str
The text to find.
icon_to_click : str
Icon to click
pause : float, optional
Additional time to wait for the text to appear between clicks. Allows time for potential animations to finish. Default value is the default_pause configuration.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ClickIconUntil    Welcome John       login_icon

Arguments

text icon_to_click
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Click icon while a given text or the icon is visible

Repeatedly click icon_to_click while text is visible on the screen or the icon_to_click disappears.

Parameters

text : str
The text that should disappear or the icon to click.
icon_to_click : str, optional
Icon to click. If not given, text is interpreted as the icon_to_click which will be clicked as long as the icon is visible.
pause : float, optional
Additional time to wait for the text to appear between clicks. Allows time for potential animations to finish. Default value is the default_pause configuration.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ClickIconWhile    login_icon
ClickIconWhile    item        scroll_icon

Arguments

text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Click text on the screen

Finds the text on the screen and clicks it.

Parameters

text : str, optional
Text to click. If None, clicks in the current position.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click position

Raises

KeywordFailException
When text is not found

Examples

ClickText    New File
ClickText    Cancel     OK
ClickText    Name       right=1

Arguments

text text_to_click anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Click text until another text appears

Repeatedly click text_to_click until text is visible on the screen.

Parameters

text : str
The text to find.
text_to_click : str
Text to click
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional time to wait for the text to appear between clicks. Allows time for potential animations to finish. Default value is the default_pause configuration.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ClickUntil    Welcome John       Login

Arguments

text text_to_click
= None
anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Click target text while a given text is visible

Repeatedly click text_to_click while text is visible on the screen.

Parameters

text : str
The text that should disappear.
text_to_click : str, optional
Text to click. If not given, same as text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional time to wait for the text to appear between clicks. Allows time for potential animations to finish. Default value is the default_pause configuration.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ClickWhile    Login
ClickWhile    Username    Login

Arguments

header
= None
๐Ÿท timeout
= None

Documentation

Close the current focused window using win32 libraries.

Optionally, a window header can be given to focus and close that window. Works on Windows OS only.

Parameters

header :
Application window header or windows class name.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.

Examples

CloseWindow
CloseWindow     Word

Arguments

text
= None

Documentation

Perform a copy

Copies whatever is active at the UI to the clipboard. If text is provided copies that to the clipboard.

Parameters

text : str, optional
Text to copy to the clipboard

Examples

# Regular copy
Copy
# Copy the provided text
Copy        text to clipboard

Arguments

text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Double click text

Finds text on the screen and double clicks it.

Parameters

text : str, optional
Text to click. If not given, clicks in the current position.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click position

Raises

KeywordFailException
When text is not found

Examples

DoubleClick    WordPad

Arguments

row_text
= None
col_text
= None
anchor
= None
๐Ÿท row_anchor
= None
๐Ÿท row_index
= None
๐Ÿท row_dist
= None
๐Ÿท col_anchor
= None
๐Ÿท col_index
= None
๐Ÿท col_dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Double click cell based on row and column

Double clicks the crossing defined by row and column texts

Parameters

row_text : str, optional
Text defining the row.
col_text : str, optional
Text defining the col.
anchor : str, optional
Anchor text for row and/or col texts
row_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
col_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
row_index : int, optional
Index of row text.
col_index : int, optional
Index of col text.
row_dist : float, optional
Maximum distance from the row anchor in widths of the anchor element. Value 1 means one anchor width away from the row anchor.
col_dist : float, optional
Maximum distance from the col anchor in widths of the anchor element. Value 1 means one anchor width away from the col anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When row or col texts could not be found.

Examples

DoubleClickCell       Row 1        Finished

Arguments

icon ๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Double click icon

Double click an icon on the screen.

Parameters

icon : str
Colon separated list of overlapping images

Returns

tuple
The (x, y) position.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

DoubleClickIcon    ok
DoubleClickIcon    ok    tol=0.5

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท button
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Drag object under the current position to destination

Use HoverText to move over the object to be dragged.

Parameters

text : str
Destination text or icon
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

button : str, optional
Which mouse button to use for dragging if input device is a mouse
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

HoverText    Start
DragTo       Destination

Arguments

enable
= True
duration
= None
speed
= None

Documentation

Make applicable inputs animated

Parameters

enable : bool
Enable/disable animations
duration : float
How many seconds one mouse movement takes

Examples

EnableAnimations

Arguments

config
= None

Documentation

Get a configuration value.

If no configuration is specified the method returns a copy of all the configuration values in a python dictionary.

Parameters

config : str

Returns

any or dict
The configuration value or a copy of all of the values if config is None

Examples

# Get the value for the "default_timeout" configuration.
GetConfig    default_timeout
# Get a copy of all configs
GetConfig

Documentation

Get the current position of the input device

This is mostly used for testing and debugging purposes

Returns

tuple[int]
The (x, y)-coordinates

Examples

${pos}=    GetCurrentPosition

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท between
= None
๐Ÿท from_start
= None
๐Ÿท from_end
= None
๐Ÿท regexp
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Copies text from the nearest input field and returns it

Parameters

text : str
Text to insert.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
between : str, optional
"Start???End" - Return all chars between texts "Start" and "End".
from_start : int, optional
Return x first chars.
from_end : int, optional
Return x last chars.
regexp : str, optional
Regular expression matching, e.g. "Start(.*)End". See https://docs.python.org/3/library/re.html. Uses re.search. If groups are used, returns the contents of the first group.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Notes

This method is experimental and may not yet work reliably.

Examples

GetInputValue     First Name

Arguments

locator
= None
anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท between
= None
๐Ÿท from_start
= None
๐Ÿท from_end
= None
๐Ÿท regexp
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Get text from UI

The text must be copyable (e.g. using ctrl + c). For reading text e.g. from images, use read_text instead.

Parameters

locator : str, optional
Visible text, e.g. a word in the sentence. If not provided gets the currently active text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Returns

str
The selected text

Other Parameters

pause : float, optional
Pause between the copy action and reading the clipboard. Useful when there is a delay before the clipboard gets updated, for instance in RDP connections. Default is the default_pause configuration.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
between : str, optional
"Start???End" - Return all chars between texts "Start" and "End".
from_start : int, optional
Return x first chars.
from_end : int, optional
Return x last chars.
regexp : str, optional
Regular expression matching, e.g. "Start(.*)End". See https://docs.python.org/3/library/re.html. Uses re.search. If groups are used, returns the contents of the first group.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

See Also

read_text : Read text using OCR

Examples

# Get currently highlighted text
GetText
# Get the sentence where this word appears
GetText    word
GetText    Some text above the desired text    below=2
# Assuming there is a text "CODE: 12345X"
GetText    CODE:    between=CODE: ???X      # '12345'
# Same with regular expressions
GetText    CODE:    regexp=CODE: (.*)X

Arguments

text ๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Returns the number of occurrences of a text.

Parameters

text : str
Text.

Other Parameters

tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

int

Examples

${n}=    GetTextCount    N380

Arguments

* keys

Documentation

Press a hot key combination

Press the given keys down. HotKey can be passed several key strings which will be pressed down in order, and then released in reverse order.

Parameters

keys :
Keys to press down.

Notes

Below is a list of supported keys that can be pressed in addition to keys that consist of a single character (like 'c' or '?').

  • alt, altleft, altright
  • backspace
  • capslock
  • ctrl, ctrlleft, ctrlright
  • delete
  • down
  • end
  • enter
  • esc
  • f1, f2, ..., f20
  • home
  • insert
  • numlock
  • pagedown, pageup
  • printscreen
  • right
  • shift, shiftleft, shiftright
  • space
  • tab
  • up
  • win, winleft, winright

Additional keys may be supported based on the underlying keyboard handling library. The default library in Python is pynput, see https://pythonhosted.org/pynput/keyboard.html for a list of keys.

Examples

HotKey    tab
HotKey    win
HotKey    ctrl       c
HotKey    ctrl       alt    del
HotKey    altleft    w

Arguments

row_text
= None
col_text
= None
anchor
= None
๐Ÿท row_anchor
= None
๐Ÿท row_index
= None
๐Ÿท row_dist
= None
๐Ÿท col_anchor
= None
๐Ÿท col_index
= None
๐Ÿท col_dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Hover cell based on row and column

Hovers the crossing defined by row and column texts

Parameters

row_text : str, optional
Text defining the row.
col_text : str, optional
Text defining the col.
anchor : str, optional
Anchor text for row and/or col texts
row_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
col_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
row_index : int, optional
Index of row text.
col_index : int, optional
Index of col text.
row_dist : float, optional
Maximum distance from the row anchor in widths of the anchor element. Value 1 means one anchor width away from the row anchor.
col_dist : float, optional
Maximum distance from the col anchor in widths of the anchor element. Value 1 means one anchor width away from the col anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When row or col texts could not be found.

Examples

HoverCell       Row 1        Finished

Arguments

color
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Hover color

Hovers over colored element on the screen. This is an experimental feature that may change or be removed in the future.

This method does not currently perform well on images, but on UI with rather solid background.

Parameters

color : str
Text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click location

Raises

KeywordFailException
When text is not found

Examples

HoverColor   red
HoverColor   blue       right=1

Arguments

icon ๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Hover icon

Move mouse over an icon on the screen.

Parameters

icon : str
Icon image name without extension

Returns

tuple
The (x, y) position.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

HoverIcon    ok
HoverIcon    ok    tol=0.5

Arguments

text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Hover text

Finds text on the screen and hovers over it.

Parameters

text : str
Text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float
How long to wait on the hover position. Default is 0.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click location

Raises

KeywordFailException
When text is not found

Examples

HoverText    New File
HoverText    Name       right=1

Arguments

icon mindelay
= None
๐Ÿท wait
= False
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Is icon on the screen currently

Checks if icon is currently on the screen.

Parameters

icon : str
Icon image name

Returns

bool

Other Parameters

wait : bool, optional
If keyword returns False, it will be run again after wait amount of time has passed.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

IsIcon    ok
IsIcon    ok    tol=0.95

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท wait
= False
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Check if text exists on the screen

Returns True if text is found on the screen, False if not.

Parameters

text : str
Text to look for.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

wait : bool, optional
If keyword returns False, it will be run again after wait amount of time has passed.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

${dialog}=    IsText    Do you want to save changes?
${active}=    IsText    File    MyApplication title

Arguments

header ๐Ÿท wait
= False

Documentation

Returns true if a window with the header exist currently

Parameters

header : str
Header of the window. Can be a substring.

Other Parameters

wait : bool, optional
If keyword returns False, it will be run again after wait amount of time has passed.

Returns

bool

Examples

${window}=    IsWindow    Word

Arguments

mode
= normal
width
= 800
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Add screenshot to the robot log

Useful for debugging purposes.

Parameters

mode : {'normal', 'annotated'}
Annotated mode adds the OCR annotations on top of the image.
width : int
Image width.

Other Parameters

tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

LogScreenshot    annotated

Arguments

header
= None
๐Ÿท timeout
= None

Documentation

Maximize focused window

Maximizes the current focused window. Optionally, a window header can be given to focus and maximize that windows. Works on Windows OS only.

Parameters

header :
Application window header or windows class name.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.

Examples

MaximizeWindow
MaximizeWindow      Word

Arguments

header
= None
๐Ÿท timeout
= None

Documentation

Minimize focused window

Minimizes the current focused window. Optionally, a window header can be given to focus and Minimize that window. Works on Windows OS only.

Parameters

header :
Application window header or windows class name.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.

Examples

MinimizeWindow
MinimizeWindow      Word

Arguments

header
= None
๐Ÿท timeout
= None

Documentation

Normalize the focused window

Optionally, a window header can be given to focus and normalize that window. Works on Windows OS only.

Parameters

header :
Application window header or windows class name.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.

Examples

NormalizeWindow
NormalizeWindow     Word

Arguments

app ** kwargs

Documentation

Open application

Helper for opening popular applications using the GUI of the operating system. In Windows it uses the "Run" -dialog.

Remember to verify the state after opening an application.

Parameters

app : str

Application to open. Current options are Browsers - 'chrome' - 'edge' - 'firefox

Office - 'excel' - 'powerpoint' - 'word'

Other - 'remote desktop connection' or 'rdp' - 'wordpad'

Other Parameters

run_translation : str, optional
The title of the run window for non supported languages (i.e. the translation of the "Run" word).

Notes

Default supported GUI languages are English, Finnish or German. For other languages, please provide the run_translation argument.

Currently supports only Windows.

See Also

run_command : Run an arbitrary command

Examples

OpenApplication    wordpad

Arguments

pages
= 1

Documentation

Page down

Perform a page down/keypress event.

Parameters

pages : int
How many repetition of page downs

Examples

PageDown    1

Arguments

pages
= 1

Documentation

Page up

Perform page up event/keypress.

Parameters

pages : int
How many repetitions of page_up

Examples

PageUp    1

Arguments

text
= None

Documentation

Performs a paste from the clipboard

If text is provided pastes that instead. Useful for adding large amounts of text to the UI.

Notes

If text is provided, may overwrite any previous content in the clipboard

Examples

# Regular paste
Paste
Paste    ${long_string_variable}

Arguments

text key anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Press a key until text is visible

Repeatedly press a key until the text is visible on the screen.

Parameters

text : str
The text to find.
key : str
Key to press, e.g. 'pagedown'
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional time to wait for the text to appear between key presses. Allows time for potential animations to finish.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

PressUntil    Item    pagedown

Arguments

text key anchor
= None
index
= None
dist
= None
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Press a key while text is visible

Repeatedly press a key while the text is visible on the screen.

Parameters

text : str
The text that should disappear.
key : str
Key to press, e.g. 'pagedown'
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional time to wait for the text to appear between key presses. Allows time for potential animations to finish.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

PressUntil    Item    pagedown

Arguments

server username password ๐Ÿท accept_certificate
= True
๐Ÿท keyboard
= fi

Documentation

Connect to a Remote Desktop Server.

Connects to a Remote Desktop Server.

Parameters

server : str
Server address or ip
username : str
Username for the RDP user.
password : str
Password for the username. Please use a variable instead of plain text password.

Other Parameters

accept_certificate : bool
Automatically accept the certificate of the RDP server. Default True.
keyboard : str
X keyboard map. Default is 'fi'.

Notes

This feature is experimental and may change in future versions. It is currently designed for Pace cloud. It is based on the Remmina linux RDP client.

Returns

None

Documentation

Disconnect from a Remote Desktop Connection.

Notes

This feature is experimental and may change in future versions. It is based on the Remmina linux RDP client.

Returns

None

Documentation

Read clipboard

Return the contents of the clipboard

Returns

str
Contents of the clipboard

Examples

${clipboard_contents}=    ReadClipboard

Arguments

row_header column_header table_caption
= None
๐Ÿท left
= 30
๐Ÿท right
= 50
๐Ÿท above
= 10
๐Ÿท below
= 10
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Reads text from a table cell

Finds a table cell based on the table row (left column) and column headers. Then reads text from it.

table_caption can be used as additional anchor. It's usually another text close to / above table. It's optional, but can be useful if there are multiple tables with same columns.

Parameters

row_header :
Table row header / text on the left side on the same row of cell to find.
column_header :
Table column header.
table_caption :
Table caption text, optional. Default value is None.
left :
Offset to left from column header from where to begin finding for the text. Usefull if column header is for example center aligned but column cell values are left aligned. Positive values make search begin on the left side from column header, negative values make search begin after the left side border of the column header. Default value: 30
right :
Offset to right from the end of column header. Where to end finding for the text. Usefull if column header is for example center aligned but column cell values are rigt aligned. Positive values make search area end given pixels further than the right border of the column header. Negative values reduce the search area. Default value: 50
above :
Offset to top from the top border of the row header. Expands search area given pixels above the row header . Useful if rows are not fully aligned. Default value: 10
below :
Offset to below from the bottom border of the row header. Expands search area given pixels below the row header . Useful if rows are not fully aligned. Default value: 10

Other Parameters

tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

ReadTableCell    Product A          Price

ReadTableCell    John Doe           Salary      Payroll Data

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท minoffset
= 1.0
๐Ÿท maxoffset
= 60.0
๐Ÿท timeout
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Reads text depending on the given text and currently set direction.

Uses anchor to select text location if multiple occurences found. Minoffset and maxoffset can be used to control how far values are read from.

Parameters

text : str
Location for starting the ReadValue from
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
minoffset : float
Minimum distance to start ReadValue from. In pixels.
maxoffset : float
Maximum distance to how far ReadValue is reading from. In pixels.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

str
Combined string value of all neighboring words

Examples

ReadText    First name
ReadText    First name    Order

Arguments

config
= None

Documentation

Reset configurations to their default value.

Parameters

config : str or None
None means all configurations will be reset.

Returns

any or dict
Previous config value or the Python dictionary containing all the previous configurations

Examples

# Reset all configs to their default values
ResetConfigs
# Reset "default_timeout" configuration to its default value
ResetConfigs    default_timeout

Arguments

text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Right click text

Finds text and clicks it with the right mouse button.

Parameters

text : str, optional
Text to click. If not given, click in the current position.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the click location

Raises

KeywordFailException
When text is not found

Examples

RightClick    New Event

Arguments

row_text
= None
col_text
= None
anchor
= None
๐Ÿท row_anchor
= None
๐Ÿท row_index
= None
๐Ÿท row_dist
= None
๐Ÿท col_anchor
= None
๐Ÿท col_index
= None
๐Ÿท col_dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Right click cell based on row and column

Right clicks the crossing defined by row and column texts

Parameters

row_text : str, optional
Text defining the row.
col_text : str, optional
Text defining the col.
anchor : str, optional
Anchor text for row and/or col texts
row_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
col_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
row_index : int, optional
Index of row text.
col_index : int, optional
Index of col text.
row_dist : float, optional
Maximum distance from the row anchor in widths of the anchor element. Value 1 means one anchor width away from the row anchor.
col_dist : float, optional
Maximum distance from the col anchor in widths of the anchor element. Value 1 means one anchor width away from the col anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When row or col texts could not be found.

Examples

RightClickCell       Row 1        Finished

Arguments

icon ๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Right click an icon

Right click an icon on the screen.

Parameters

icon : str
Icon image filename

Returns

tuple
The (x, y) position.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

RightClickIcon    ok
RightClickIcon    ok    tol=0.5

Arguments

command ** kwargs

Documentation

Run a command

Runs the given command in the Windows Run -dialog.

Parameters

command : str
Command to run

Other Parameters

run_translation : str, optional
The title of the run window for non supported languages (i.e. the translation of the "Run" word).

Notes

Supports Windows GUI in either English, Finnish or German.

Examples

RunCommand    wordpad
RunCommand    wordpad filename.rtf

Arguments

text text_to_appear anchor
= None
timeout
= None
interval
= None
** kwargs

Documentation

Click text until another text is visible

Click text until text_to_appear is visible.

See Also

click_until

Notes

This is a QWeb compatibility method with the signature adapted to QVision. Consider using ClickUntil instead.

Examples

ScanClick    Cart    Cart contents
ScanClick    Cart    Cart contents    1          5s
ScanClick    Cart    Cart contents    Main Cart  20s   3s

Arguments

text
= None
amount
= None
anchor
= None
index
= None
dist
= None
๐Ÿท horizontal
= False
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Scroll to text

Scrolls until the text is visible on the screen

Parameters

text : str, optional
Text to scroll to. If None, performs a single scroll.
amount : int, optional
How much to scroll in pixels. Positive values scroll the mouse wheel up, negative values down. Default value is given by the scroll_amount configuration.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional pause between between subsequent scrolls. Allows time for scrolling animations to finish.

Other Parameters

horizontal : bool
Scroll horizontally instead of vertically. Default is False.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ScrollTo    Item

Arguments

text
= None
amount
= None
anchor
= None
index
= None
dist
= None
๐Ÿท horizontal
= False
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Scroll to text

Scrolls until the text is visible on the screen

Parameters

text : str, optional
Text to scroll to. If None, performs a single scroll.
amount : int, optional
How much to scroll in pixels. Positive values scroll the mouse wheel up, negative values down. Default value is given by the scroll_amount configuration.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional pause between between subsequent scrolls. Allows time for scrolling animations to finish.

Other Parameters

horizontal : bool
Scroll horizontally instead of vertically. Default is False.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ScrollTo    Item

Arguments

text
= None
amount
= None
anchor
= None
index
= None
dist
= None
๐Ÿท horizontal
= False
๐Ÿท pause
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None

Documentation

Scroll while text is visible

Scrolls until the text is not visible on the screen.

Parameters

text : str, optional
The text that should disappear.
amount : int, optional
How much to scroll in pixels. Positive values scroll the mouse wheel up, negative values down. Default value is given by the scroll_amount configuration.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
pause : float, optional
Additional pause between between subsequent scrolls. Allows time for scrolling animations to finish.

Other Parameters

horizontal : bool
Scroll horizontally instead of vertically. Default is False.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Examples

ScrollWhile    Item

Arguments

locator_text
= None
reach
= line
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Select text from the UI

Selects (highlights) text from the UI based on locator_text.

Parameters

locator_text : str, optional
Text to use to perform the selection from. If None, uses current pointer position.
reach : {'all', 'line', 'word'}
How much of the text to select. Default is "line".
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Notes

Based on the reach parameter the selection is performed by:

  • all: click at the position followed by "ctrl + a"
  • line: triple click at the position
  • word: double click at the position

Examples

SelectText    First
SelectText    Target Path       below=1
SelectText    Price             anchor=Total        right=3

Arguments

config * values ๐Ÿท detect_type
= True
๐Ÿท non_existing
= raise

Documentation

Set a configuration value.

Configurations allow you to change how QVision works. For instance you can adjust the time how long QVision retries PaceWords before allowing them to fail.

Parameters

config : str
The configuration name
values : any
The configuration value(s)

Returns

any
The previous configuration value

Other Parameters

detect_type : bool, optional
Automatically convert integer and float values. Default is True.

Notes

Below is a list of all the available configurations, their explanations and default values.

General configs:

  • default_timeout (float): Default time (in seconds) to retry keywords before allowing them to fail (e.g. VerifyText). Useful if the application is slow to respond. Default value is 15 seconds.
  • default_pause (float): Default pause time (in seconds) for PaceWords that support the pause parameter (e.g. ScrollTo). Used for allowing the UI to react to inputs (e.g. perform animations) before checking the repeat condition. Default is 0.1 seconds.

Screen related configs:

  • region (int, int, int, int): Screenshot will be cropped to the given region of (x1, y1, x2, y2), e.g. (0, 0, 100, 100). Default is None.
  • monitor (int or any): Specify the monitor index starting from 1. Default is 0 meaning no monitor setting.
  • use_active_window (bool): Use the currently active window as the region. Any region setting will override this setting. Currently available in Windows only. Default is True.

Input related configs:

  • characters_per_second (float): Keyboard typing speed. Useful if the application under test cannot handle too fast typing (e.g. misses characters with WriteText). Default value is 100.
  • click_interval (float): Interval time (in seconds) between subsequent click inputs at the same location (e.g. DoubleClick followed by DragTo). Prevents the subsequent clicks to be registered as single click event by the operating system (e.g. double click and a normal click will not be interpreted as a triple click). Default value is 0.6 seconds.
  • input_interval (float): Interval time (in seconds) between subsequent inputs (e.g. ClickText followed by HotKey). Prevents input events merging to each other. Default value is 0.05 seconds.
  • scroll_amount (int): Default scroll amount in pixels with a mouse. Default value is 200.

Computer vision and OCR related configs:

  • cv_mode (str): Mode for computer vision. Mode edge enables latest improvements that may not yet be fully tested. Mode legacy uses previous stable methods. Default value is stable.
  • ignore_case (str): When matching text (e.g. VerifyText) ignore the case. This means that a string "Some Text" will match with "some text". Currently only available for sentences. Default value is "sentence".
  • ignored_chars (str): When matching text (e.g. VerifyText) ignore these characters. Default value is "_".
  • ocr_scale (float): Scale screenshots before applying OCR. Image width and height will be multiplied by scale. For instance an image of 100x100 pixels will become 200x200 for OCR if scale is 2.0. Helps in detecting small text by making it larger with scale values > 1.0. Detect large text by setting the scale < 1.0.
  • search_direction (str): Set the direction for finding elements or text. Currently used for automatic input field finding (e.g. TypeText) and OCR text reading (ReadText). Default value is "right".
  • tolerance_icon (float): How much the matched icon can deviate from the reference icon (e.g. in VerifyIcon). Value 1.0 means that it must match exactly while 0.0 would match anything on the screen. Default value is 0.9.
  • tolerance_text (float): How closely recognized text on the screen should match the reference text (e.g. in VerifyText). Value 1.0 means that every character should match exactly while 0.8 means that roughly 80% of the characters should match. Default value is 0.8.

Examples

# General configurations
SetConfig    default_timeout            15.0
SetConfig    default_pause              0.1

# Screen related configurations
SetConfig    monitor                    0
SetConfig    region                     ${None}
SetConfig    use_active_window          True

# Input related configurations
SetConfig    characters_per_second      100
SetConfig    click_interval             0.6
SetConfig    input_interval             0.05
SetConfig    scroll_amount              200

# Computer vision and OCR related configs
SetConfig    ignore_case                sentence
SetConfig    ignored_chars              _
SetConfig    ocr_scale                  1.0
SetConfig    search_direction           right
SetConfig    tolerance_icon             0.9
SetConfig    tolerance_text             0.8

Arguments

direction

Documentation

Sets the global direction used for finding elements.

For instance TypeText uses this direction to find text fields.

Parameters

direction :
Direction used for finding elements. Possible values are up, down, left, and right.

Examples

SetDirection    right
SetDirection    down

Arguments

scale

Documentation

Set the display scale manually

In Windows 10 this value is found by clicking the desktop with the right mouse button and selecting the option "Display settings".

This parameter is currently not used.

Parameters

scale : str
The display scale percentage, e.g. 100% or 150%

Returns

str
Previous scale percentage value

Examples

SetDisplayScale    125%

Arguments

device_name * args ** kwargs

Documentation

Set input device

Parameters

device_name : str
One of - 'host': use the host machine keyboard and mouse - 'pyautogui' - 'android' - 'qmobile' - 'mock': mock interface that only writes logs. Useful for testing.

Notes

Earlier device name screen is deprecated and will be removed in a future version.

Examples

SetInputDevice    host

Arguments

engine_name * args ** kwargs

Documentation

Set input device

Parameters

engine_name : str

Examples

SetOcrEngine    default
SetOcrEngine    RevisionEngine
SetOcrEngine    Legacy1_2Engine

Arguments

lang
= fin

Documentation

Set the OCR language

Setting a language will allow the OCR engine to use dictionary for more accurate recognition results.

Parameters

lang : str
A three letter language code (ISO 639-2), e.g. 'eng'.

Examples

SetOcrLanguage    eng
SetOcrLanguage    fin

Arguments

reference_folder

Documentation

Sets reference folder for image files.

Parameters

reference_folder : str
Reference folder for icon image files.

Examples

SetReferenceFolder   ${CURDIR}/reference_images

Arguments

device_name * args ** kwargs

Documentation

Sets the source for capturing screenshots

Set the source device for capturing screenshots from, e.g. the screen of the host computer.

Parameters

device_name : {'screen', 'pyautogui', 'camera'}
Source device for capturing screenshots. Default is 'screen'.

Examples

SetScreenDevice    pyautogui
SetScreenDevice    screen    monitor=1

Arguments

text text_to_disappear
= None
anchor
= None
timeout
= None
interval
= None
** kwargs

Documentation

Click text while another text is visible

Click text while text_to_disappear is visible on the screen.

See Also

click_while

Notes

This is a QWeb compatibility method with the signature adapted to QVision. Consider using ClickWhile instead.

Examples

ScanClick    Cart    Cart contents

Arguments

text
= None
anchor
= None
index
= None
dist
= None
amount
= 450
speed
= 0.2
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Make a swipe down starting from text.

If text is None, swipe from middle of screen.

Parameters

text : str
Location that the swipe is started from
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
amount : int
How many pixels are used for swipe
speed : float
How long the swipe action takes. Default is 0.2 seconds.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

SwipeDown    Advertisement

Arguments

text
= None
anchor
= None
index
= None
dist
= None
amount
= 450
speed
= 0.2
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Make a left swipe starting from text.

If text is None, swipe from middle of screen.

Parameters

text : str
Location that the swipe is started from
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
amount : int
How many pixels are used for swipe
speed : float
How long the swipe action takes. Default is 0.2 seconds.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

SwipeLeft    Advertisement

Arguments

text
= None
anchor
= None
index
= None
dist
= None
amount
= 450
speed
= 0.2
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Make a right swipe starting from text.

If text is None, swipe from middle of screen.

Parameters

text : str
Location that the swipe is started from
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
amount : int
How many pixels are used for swipe
speed : float
How long the swipe action takes. Default is 0.2 seconds.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

SwipeRight    Advertisement

Arguments

text
= None
anchor
= None
index
= None
dist
= None
amount
= 450
speed
= 0.2
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Make a swipe up starting from text.

If text is None, swipe from middle of screen.

Parameters

text : str
Location that the swipe is started from
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.
amount : int
How many pixels are used for swipe
speed : float
How long the swipe action takes. Default is 0.2 seconds.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

SwipeUp    Advertisement

Arguments

row_header column_header text_to_insert table_caption
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Add text to a table cell

Finds a table cell based on the table row and column headers. Then inserts text into it.

Parameters

row_header :
Table row header.
column_header :
Table column header.
text_to_insert :
Text to insert.
table_caption :
Table caption text, optional. Default value is None.

Other Parameters

tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

TableCell    11    A    13.00
TableCell    John    Salary    3500

Arguments

text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Triple click text

Finds text on the screen and triple clicks it.

Parameters

text : str, optional
Text to click. If not given, clicks in the current position.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

TripleClick    New event

Returns

tuple
Coordinates of the click location

Raises

KeywordFailException
When text is not found

Arguments

row_text
= None
col_text
= None
anchor
= None
๐Ÿท row_anchor
= None
๐Ÿท row_index
= None
๐Ÿท row_dist
= None
๐Ÿท col_anchor
= None
๐Ÿท col_index
= None
๐Ÿท col_dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Triple click cell based on row and column

Triple clicks the crossing defined by row and column texts

Parameters

row_text : str, optional
Text defining the row.
col_text : str, optional
Text defining the col.
anchor : str, optional
Anchor text for row and/or col texts
row_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
col_anchor : str, optional
Anchor text for row texts. If not given, value of anchor is used.
row_index : int, optional
Index of row text.
col_index : int, optional
Index of col text.
row_dist : float, optional
Maximum distance from the row anchor in widths of the anchor element. Value 1 means one anchor width away from the row anchor.
col_dist : float, optional
Maximum distance from the col anchor in widths of the anchor element. Value 1 means one anchor width away from the col anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When row or col texts could not be found.

Examples

TripleClickCell       Row 1        Finished

Arguments

field_name secret anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Type a secret to an input field

The secret will be censored from logs.

Parameters

field_name : str
Name of the text field.
secret : str
Secret to write
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Notes

Generally all secret credentials in Robot FW scripts should be provided as external variables. Secrets should not be stored to the test script or version control.

See Also

type_text : Type text to an input field write_secret : Write a secret

Examples

# Provide PASSWD outside the Robot FW script as follows:
# robot --variable PASSWD:mypass123 test.robot
TypeSecret    password    ${PASSWD}

Arguments

field_name secret anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Type a partially shown secret to an input field

Only the first 3 characters will be shown of the secret.

Parameters

field_name : str
Name of the text field.
secret : str
Secret to write
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

See Also

type_text : Type text to an input field write_secret3 : Write a secret

Notes

Generally all secret credentials in Robot FW scripts should be provided as external variables. Secrets should not be stored to the test script or version control.

Examples

# Provide PASSWD outside the Robot FW script as follows:
# robot --variable PASSWD:mypass123 test.robot
TypeSecret    password    ${PASSWD}

Arguments

field_name text anchor
= None
index
= None
dist
= None
๐Ÿท elem_index
= None
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท _offsets
= None

Documentation

Type text to a text field

Type text to a text field. You can use offsets or try automatic input field detection (experimental feature).

Parameters

field_name : str
Name of the text field.
text : str
Text to insert.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

elem_index : int, optional
Index of the text field.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).

Notes

In case offsets are provided, they are used to activate the input field before typing. Otherwise this keywords attempts to automatically detect the input field.

Automatic input field detection is still an experimental feature.

Examples

TypeText     Name     John Doe
TypeText     Price    1,00         EUR

# Specify the location of the input field
TypeText    Name      John Doe     right=5

Arguments

* texts ๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies any of the given texts

Verify that at least one of the texts is found. Useful for handling session dependent states, such as logins or popups.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

VerifyAny    Login    Front Page

# Follow up to check which state
${login}=    IsText       Login

Arguments

label anchor
= None
index
= None
dist
= None
๐Ÿท elem_index
= None
๐Ÿท threshold
= 0.8
๐Ÿท timeout
= None
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Verify that checkbox is checked

Verifies that the checkbox is checked

Parameters

label : str, optional
Checkbox label text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

elem_index : int, optional
Index of the checkbox.
threshold : float, optional
Adjust the threshold in (0, 1] for determining if checkbox was checked.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the checkbox

Raises

KeywordFailException
When lable or checkbox are not found or the checkbox is not checked.

Notes

This keyword is experimental. This means that it may not yet work properly in many cases and its signature may change in future versions.

Examples

*** Keywords ***
Examples
    VerifyChecked    Allow advertisement email

Arguments

icon mindelay
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verify that icon is visible on the screen

Verifies that icon is visible on the screen. Verification fails if icon is not found within a timeout.

Parameters

icon : str
Icon image name

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException

Examples

VerifyIcon    ok
VerifyIcon    ok    tol=0.6

Arguments

text row_text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies that text does not exists on the row.

Retries the keyword until text is not found on the row or the timeout is reached.

Parameters

text : str
Text to find from the row.
row_text : str or None
Known text on the row or current pointer position if None
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When text can not be found from the row

Examples

VerifyRow       Finished
VerifyRow       Finished            Row 1

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies that text is not found on the screen.

If text is visible, retries the keyword until the text disappears or the timeout is reached.

Parameters

text : str
Text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
If text is found

Examples

VerifyNoText       Order number

Arguments

label anchor
= None
index
= None
dist
= None
๐Ÿท elem_index
= None
๐Ÿท timeout
= None
๐Ÿท threshold
= 0.8
๐Ÿท left
= None
๐Ÿท right
= None
๐Ÿท above
= None
๐Ÿท below
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None
๐Ÿท _offsets
= None

Documentation

Verify that checkbox is not checked

Verifies that the checkbox is not checked

Parameters

label : str, optional
Checkbox label text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

elem_index : int, optional
Index of the checkbox.
threshold : float, optional
Adjust the threshold in (0, 1] for determining if checkbox was checked.
timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
left, right : float, optional
Perform the action this many character widths to the left/right from the target
above, below : float, optional
Perform the action this many character heights above/below the target
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Returns

tuple
Coordinates of the checkbox

Raises

KeywordFailException
When lable or checkbox are not found or the checkbox is not checked.

Notes

This keyword is experimental. This means that it may not yet work properly in many cases and its signature may change in future versions.

Examples

*** Keywords ***
Examples
    VerifyChecked    Allow advertisement email

Arguments

text row_text
= None
anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies that text exists on the row.

Retries the keyword until text is found on the row or the timeout is reached.

Parameters

text : str
Text to find from the row.
row_text : str or None
Known text on the row or current pointer position if None
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When text can not be found from the row

Examples

VerifyRow       Finished
VerifyRow       Finished            Row 1

Arguments

text

Documentation

Verifies selected text on UI

Verifies that the currently selected text on UI matches the given text.

Parameters

text : str
Text to verify

Notes

The selection must be copyable.

Examples

VerifySelected    package.zip

Arguments

row_header column_header expected table_caption
= None
๐Ÿท left
= 30
๐Ÿท right
= 50
๐Ÿท above
= 10
๐Ÿท below
= 10
๐Ÿท partial_match
= False
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies text from a table cell

Finds a table cell based on the table row (left column) and column headers. Then compares text from it with the expected text.

table_caption can be used as additional anchor. It's usually another text close to / above table. It's optional, but can be useful if there are multiple tables with same columns.

Parameters

row_header :
Table row header / text on the left side on the same row of cell to find.
column_header :
Table column header.
expected :
The expected value to compare against.
table_caption :
Table caption text, optional. Default value is None.
left :
Offset to left from column header from where to begin finding for the text. Usefull if column header is for example center aligned but column cell values are left aligned. Positive values make search begin on the left side from column header, negative values make search begin after the left side border of the column header. Default value: 30
right :
Offset to right from the end of column header. Where to end finding for the text. Usefull if column header is for example center aligned but column cell values are rigt aligned. Positive values make search area end given pixels further than the right border of the column header. Negative values reduce the search area. Default value: 50
above :
Offset to top from the top border of the row header. Expands search area given pixels above the row header . Useful if rows are not fully aligned. Default value: 10
below :
Offset to below from the bottom border of the row header. Expands search area given pixels below the row header . Useful if rows are not fully aligned. Default value: 10

Other Parameters

tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Examples

VerifyTableCell    John    Salary    120000    Payroll Data

Arguments

text anchor
= None
index
= None
dist
= None
๐Ÿท timeout
= None
๐Ÿท tol
= None
๐Ÿท scale
= None
๐Ÿท screenshot
= None

Documentation

Verifies that text is found on the screen.

Retries the keyword until text is found on the screen or the timeout is reached.

Parameters

text : str
Text.
anchor : str, optional
Anchor text or icon near the target. Useful when there are many texts on the screen that match the target.
index : int, optional
When there are many target texts, allows one to choose one of them starting from the top-left corner. First index is 1. If anchor is given, orders the targets based on their distance from the anchor.
dist : float, optional
Maximum distance allowed from the anchor. Value 1.0 means that the target text can be at most 1 anchor element width away from the anchor.

Other Parameters

timeout : float, optional
Retry the keyword until timeout seconds has passed. Default value can be set with the "default_timeout" configuration.
tol: float, optional
Set a temporary similarity tolerance for icons and text. Values can be from 0.0 to 1.0. A value 1.0 means that an exact match is required.
scale : float, optional
Set a temporary scale parameter for text detection or icon matching (see SetOCRScale keyword).
screenshot : str, optional
Optional file to use as a screenshot

Raises

KeywordFailException
When text can not be found

Examples

VerifyText       Order number
VerifyText       File            Edit

Arguments

amount

Documentation

Wait for an amount of time

Calling this function will also trigger a screen refresh.

Parameters

amount : float
Amount of time to wait in seconds if not otherwise specified

Examples

Wait    3.0
Wait    1 min

Arguments

secret

Documentation

Write a secret

Write a secret that will be censored from logs.

Parameters

secret : str

Examples

Generally all secret credentials in Robot FW scripts should be provided as external variables. Secrets should not be stored to the test script or version control.

# Provide PASSWD outside the Robot FW script as follows:
# robot --variable PASSWD:mypass123 test.robot
WriteSecret    ${PASSWD}

Arguments

secret

Documentation

Write a partially shown secret

Only the first 3 characters will be shown of the secret.

Examples

Generally all secret credentials in Robot FW scripts should be provided as external variables. Secrets should not be stored to the test script or version control.

# Provide PASSWD outside the Robot FW script as follows:
# robot --variable PASSWD:mypass123 test.robot
WriteSecret    ${PASSWD}

Arguments

text

Documentation

Write text

Write text to the active UI element.

Parameters

text : str
Text to type.

Examples

WriteText    Hello World!

QVision

image/svg+xml