Clear Clipboard

Clear the system clipboard.

Click

Click at the element indicated by locator.

Arguments

Argument Type Default value Description
locator str NoneLocator for click position
action Action { click | left_click | double_click | ... } Action.clickClick action, e.g. right click
param locator:Locator for click position
param action:Click action, e.g. right click

Examples

*** Tasks ***
Click
Click    LoginForm.Button
Click    coordinates:500,200    triple click

Click With Offset

Click at a given pixel offset from the given locator.

Arguments

Argument Type Default value Description
locator str NoneLocator for click start position
x int 0Click horizontal offset in pixels
y int 0Click vertical offset in pixels
action Action { click | left_click | double_click | ... } Action.clickClick action, e.g. right click
param locator:Locator for click start position
param x:Click horizontal offset in pixels
param y:Click vertical offset in pixels
param action:Click action, e.g. right click

Examples

*** Tasks ***
Click with offset    Robocorp.Logo    y=400

Close All Applications

Close all opened applications.

Examples

*** Tasks ***
Open file    order1.docx
Open file    order2.docx
Open file    order3.docx
# Do something with Word
Close all applications

Close Application

Close given application. Needs to be started with this library.

Arguments

Argument Type Default value Description
app ApplicationApp instance

Close given application. Needs to be started with this library.

param app:App instance

Examples

*** Tasks ***
${word}=    Open file    template.docx
# Do something with Word
Close application    ${word}

Copy To Clipboard

Read value to system clipboard from given input element.

Arguments

Argument Type Default value Description
locatorLocator for element
param locator:Locator for element
returns:Current clipboard value

Examples

*** Tasks ***
${value}=    Copy to clipboard    ResultPage.Counter
Log    Copied text: ${value}

Drag And Drop

Drag mouse from source to destination while holding the left mouse button.

Arguments

Argument Type Default value Description
source strLocator for start position
destination strLocator for destination position
start_delay float 2.0Delay in seconds after pressing down mouse button
end_delay float 0.5Delay in seconds before releasing mouse button
param source:Locator for start position
param destination:
 Locator for destination position
param start_delay:
 Delay in seconds after pressing down mouse button
param end_delay:
 Delay in seconds before releasing mouse button

Find Element

Find an element defined by locator, and return its position.

Arguments

Argument Type Default value Description
locator strLocator string
param locator:Locator string

Examples

*** Tasks ***
${match}=    Find element    image:logo.png
Log    Found logo at ${match.x}, ${match.y}

Find Elements

Find all elements defined by locator, and return their positions.

Arguments

Argument Type Default value Description
locator strLocator string
param locator:Locator string

Examples

*** Tasks ***
${matches}=    Find elements    image:icon.png
FOR    ${match}  IN  @{matches}
    Log    Found icon at ${match.x}, ${match.y}
END

Get Clipboard Value

Read current value from system clipboard.

Examples

*** Tasks ***
Copy to clipboard       coordinates:401,198
${text}=    Get clipboard value
Log    We just copied '${text}'

Get Display Dimensions

Returns the dimensions of the current virtual display, which is the combined size of all physical monitors.

Returns the dimensions of the current virtual display, which is the combined size of all physical monitors.

Get Mouse Position

Get current mouse position in pixel coordinates.

Examples

*** Tasks ***
${position}=    Get mouse position
Log    Current mouse position is ${position.x}, ${position.y}

Highlight Elements

Draw an outline around all matching elements.

Arguments

Argument Type Default value Description
locator str

Move Mouse

Move mouse to given coordinates.

Arguments

Argument Type Default value Description
locator strLocator for mouse position
param locator:Locator for mouse position

Examples

*** Tasks ***
Move mouse    Robocorp.Logo
Move mouse    offset:0,400

Open Application

Start a given application by name (if in PATH), or by path to executable.

Arguments

Argument Type Default value Description
name_or_path strName or path of application
*args

Start a given application by name (if in PATH), or by path to executable.

param name_or_path:
 Name or path of application
param args:Command line arguments for application
returns:Application instance

Examples

*** Tasks ***
Open application    notepad.exe
Open application    c:\path\to\program.exe    --example-argument

Open File

Open a file with the default application.

Arguments

Argument Type Default value Description
path strPath to file
param path:Path to file

Examples

*** Tasks ***
Open file    orders.xlsx

Paste From Clipboard

Paste value from system clipboard into given element.

Arguments

Argument Type Default value Description
locatorLocator for element
param locator:Locator for element

Examples

*** Tasks ***
Copy to clipboard       coordinates:401,198
Paste from clipboard    coordinates:822,710

Press Keys

Press multiple keys down simultaneously.

Arguments

Argument Type Default value Description
*keys str
param keys:Keys to press

Examples

*** Tasks ***
Press keys    ctrl  alt  delete

Press keys    ctrl  a
Press keys    ctrl  c
${all_text}=  Get clipboard value
Log    Text box content was: ${all_text}

Press Mouse Button

Press down mouse button and keep it pressed.

Arguments

Argument Type Default value Description
button typing.Any left

Release Mouse Button

Release mouse button that was previously pressed.

Arguments

Argument Type Default value Description
button typing.Any left

Set Clipboard Value

Write given value to system clipboard.

Arguments

Argument Type Default value Description
text str

Examples

*** Tasks ***
Set clipboard value     This is some text.
Paste from clipboard    coordinates:822,710

Set Default Confidence

Set the default template matching confidence.

Arguments

Argument Type Default value Description
confidence floatValue from 1 to 100
param confidence:
 Value from 1 to 100

Take Screenshot

Take a screenshot of the whole screen, or an element identified by the given locator.

Arguments

Argument Type Default value Description
path str NonePath to screenshot. The string {index} will be replaced with an index number to avoid overwriting previous screenshots.
locator str NoneElement to crop screenshot to
embed bool TrueEmbed screenshot into Robot Framework log

Take a screenshot of the whole screen, or an element identified by the given locator.

param path:Path to screenshot. The string {index} will be replaced with an index number to avoid overwriting previous screenshots.
param locator:Element to crop screenshot to
param embed:Embed screenshot into Robot Framework log

Type Text

Type text one letter at a time.

Arguments

Argument Type Default value Description
text strText to write
*modifiers str
enter bool FalsePress Enter / Return key after typing text
param text:Text to write
param modifiers:
 Modifier or functions keys held during typing
param enter:Press Enter / Return key after typing text

Examples

*** Tasks ***
Type text    this text will be uppercase    shift

Type Text Into

Type text at the position indicated by given locator.

Arguments

Argument Type Default value Description
locator strLocator of input element
text strText to write
clear bool FalseClear element before writing
enter bool FalsePress Enter / Return key after typing text
param locator:Locator of input element
param text:Text to write
param clear:Clear element before writing
param enter:Press Enter / Return key after typing text

Examples

*** Tasks ***
Type text into    LoginForm.Name      Marky Mark
Type text into    LoginForm.Password  ${PASSWORD}

Wait For Element

Wait for an element defined by locator to exist or until timeout is reached.

Arguments

Argument Type Default value Description
locator strLocator string
timeout float 10.0
interval float 0.5

Wait for an element defined by locator to exist or until timeout is reached.

param locator:Locator string

Examples

*** Tasks ***
Wait for element    alias:CookieConsent    timeout=30
Click    image:%{ROBOT_ROOT}/accept.png