Note: You are looking at a static snapshot of documentation related to Robot Framework automations. The most recent documentation is at https://robocorp.com/docs

RPA.SAP

Performs a single click on a given element. Used only for buttons, tabs and menu items.

Arguments

ArgumentTypeDefault value
element_idnull

In case you want to change a value of an element like checkboxes of selecting an option in dropdown lists, use select checkbox or select from list by label instead.

Clicks a button of a toolbar within a GridView 'table_id' which is contained within a shell object. Use the Scripting tracker recorder to find the 'button_id' of the button to click

Arguments

ArgumentTypeDefault value
table_idnull
button_idnull

Connects to an open connection. If the connection matches the given connection_name, the session is connected to this connection.

Arguments

ArgumentTypeDefault value
connection_namenull

Connects to an open session SAP.

Arguments

ArgumentTypeDefault value
explicit_wait0

See Opening a connection / Before running tests for details about requirements before connecting to a session.

Optionally set explicit wait can be used to set the explicit wait time.

Examples:

KeywordAttributes
connect to session
connect to session3
connect to sessionexplicit_wait=500ms

Disables automatic screenshots on error.

Performs a double-click on a given element. Used only for shell objects.

Arguments

ArgumentTypeDefault value
element_idnull
item_idnull
column_idnull

Checks whether an element is present on the screen.

Arguments

ArgumentTypeDefault value
element_idnull
messageNone

Checks whether the element value is the same as the expected value. The possible expected values depend on the type of element (see usage).

Arguments

ArgumentTypeDefault value
element_idnull
expected_valuenull
messageNone

Usage:

Element typepossible values
textfieldtext
labeltext
checkboxchecked / unchecked
radiobuttonchecked / unchecked
comboboxtext of the option to be expected

Checks whether the element value contains the expected value. The possible expected values depend on the type of element (see usage).

Arguments

ArgumentTypeDefault value
element_idnull
expected_valuenull
messageNone

Usage:

Element typepossible values
textfieldtext
labeltext
comboboxtext of the option to be expected

Enables automatic screenshots on error.

Set focus into the element and click it.

Arguments

ArgumentTypeDefault value
element_idstrnull
wait_timefloat, NoneNone

Note. The default library wait time can be adjusted using Set Explicit Wait keyword. Library's explicit_wait will be used if wait_time parameter is not set.

:param element_id: locator for the element :param wait_time: the wait time after the action

Set focus into the element and input text into it.

Arguments

ArgumentTypeDefault value
element_idstrnull
textstrnull
wait_timefloat, NoneNone

Note. The default library wait time can be adjusted using Set Explicit Wait keyword. Library's explicit_wait will be used if wait_time parameter is not set.

:param element_id: locator for the element :param text: text to be inputted :param wait_time: the wait time after the action

Performs a single click on a given element.

Arguments

ArgumentTypeDefault value
element_idnull
click_typepress

Differs from Click Element keyword so that element type is ignored, instead click_type (either press or select) is performed on the element if possible.

In case you want to change a value of an element like checkboxes of selecting an option in dropdown lists, use select checkbox or select from list by label instead.

:param element_id: locator for the element :param click_type: either press (default) or select

Inserts the given password into the text field identified by locator.

Arguments

ArgumentTypeDefault value
element_idnull
passwordnull

This keyword does NOT depend on the type of the element. Will set password to the element's 'text' attribute if possible.

The password is not recorded in the log.

:param element_id: locator for the element :param password: password to be inputted

Inserts the given text into the text field identified by locator. Use keyword input password to insert a password in a text field.

Arguments

ArgumentTypeDefault value
element_idnull
textnull

This keyword does NOT depend on the type of the element. Will set text to the element's 'text' attribute if possible.

:param element_id: locator for the element :param text: text to be inputted

Returns the cell value for the specified cell.

Arguments

ArgumentTypeDefault value
table_idnull
row_numnull
col_idnull

:param table_id: locator for the table element :param row_num: table row number :param col_id: table cell id :return: text in the specified cell

Returns the Sap element location for the given element.

Arguments

ArgumentTypeDefault value
element_idnull

Returns the Sap element type for the given element.

Arguments

ArgumentTypeDefault value
element_idnull

Returns the Sap element type for the given element.

Arguments

ArgumentTypeDefault value
elementnull

:param element: SAP element :return: type of the SAP element

Returns the number of rows found in the specified table.

Arguments

ArgumentTypeDefault value
table_idnull

Returns the scroll position of the scrollbar of an element 'element_id' that is contained within a shell object.

Arguments

ArgumentTypeDefault value
element_idnull

Retrieves the messageType in the statusbar the given window.

Arguments

ArgumentTypeDefault value
windowstr, Nonewnd[0]

Takes screenshot on error.

:param window: locator for the statusbar, default 'wnd[0]' :return: messageType of the /sbar element or empty string

Gets the value of the given element. The possible return values depend on the type of element (see Return values).

Arguments

ArgumentTypeDefault value
element_idnull

Return values:

Element typeReturn values
textfieldtext
labeltext
checkboxchecked / unchecked
radiobuttonchecked / unchecked
comboboxtext of the selected option
guibuttontext
guititlebartext
guistatusbartext
guitabtext

Retrieves the window title of the given window.

Arguments

ArgumentTypeDefault value
locatornull

Inserts the given password into the text field identified by locator. The password is not recorded in the log.

Arguments

ArgumentTypeDefault value
element_idnull
passwordnull

Inserts the given text into the text field identified by locator. Use keyword input password to insert a password in a text field.

Arguments

ArgumentTypeDefault value
element_idnull
textnull

Maximizes the SapGui window.

Arguments

ArgumentTypeDefault value
window0

Opens a connection to the given connection name. Be sure to provide the full connection name, including the bracket part.

Arguments

ArgumentTypeDefault value
connection_namenull

Calls the PressF1 function on the passed element id. The element can be a textfield or a GridView inside a shell.

Arguments

ArgumentTypeDefault value
element_idstrnull

:param element_id: id of the SAP element

Calls the PressF4 function on the passed element id. The element can be a textfield or a GridView inside a shell.

Arguments

ArgumentTypeDefault value
element_idstrnull

:param element_id: id of the SAP element

Runs a Sap transaction. An error is given when an unknown transaction is specified.

Arguments

ArgumentTypeDefault value
transactionnull

Scrolls the scrollbar of an element 'element_id' that is contained within a shell object. 'Position' is the number of rows to scroll.

Arguments

ArgumentTypeDefault value
element_idnull
positionnull

Selects checkbox identified by locator. Does nothing if the checkbox is already selected.

Arguments

ArgumentTypeDefault value
element_idnull

Selects an item from the context menu by clicking a button or right-clicking in the node context menu.

Arguments

ArgumentTypeDefault value
element_idnull
menu_or_button_idnull
item_idnull

Selects the specified option from the selection list.

Arguments

ArgumentTypeDefault value
element_idnull
valuenull

Selects a node of a TableTreeControl 'tree_id' which is contained within a shell object.

Arguments

ArgumentTypeDefault value
tree_idnull
node_idnull
expandFalse

Use the Scripting tracker recorder to find the 'node_id' of the node. Expand can be set to True to expand the node. If the node cannot be expanded, no error is given.

Sets radio button to the specified value.

Arguments

ArgumentTypeDefault value
element_idnull

Selects an entire column of a GridView 'table_id' which is contained within a shell object.

Arguments

ArgumentTypeDefault value
table_idnull
column_idnull

Use the Scripting tracker recorder to find the 'column_id' of the column to select.

Selects an entire row of a table. This can either be a TableControl or a GridView 'table_id' which is contained within a shell object. The row is an index to select the row, starting from 0.

Arguments

ArgumentTypeDefault value
table_idnull
row_numnull

Sends a SAP virtual key combination to the window, not into an element. If you want to send a value to a text field, use input text instead.

Arguments

ArgumentTypeDefault value
vkey_idnull
window0

To send a vkey, you can either use te VKey ID or the Key combination.

Sap Virtual Keys (on Windows)

VKey IDKey combinationVKey IDKey combinationVKey IDKey combination
0Enter26Ctrl + F272Ctrl + A
1F127Ctrl + F373Ctrl + D
2F228Ctrl + F474Ctrl + N
3F329Ctrl + F575Ctrl + O
4F430Ctrl + F676Shift + Del
5F531Ctrl + F777Ctrl + Ins
6F632Ctrl + F878Shift + Ins
7F733Ctrl + F979Alt + Backspace
8F834Ctrl + F1080Ctrl + Page Up
9F935Ctrl + F1181Page Up
10F1036Ctrl + F1282Page Down
11F11 or Ctrl + S37Ctrl + Shift + F183Ctrl + Page Down
12F12 or ESC38Ctrl + Shift + F284Ctrl + G
14Shift + F239Ctrl + Shift + F385Ctrl + R
15Shift + F340Ctrl + Shift + F486Ctrl + P
16Shift + F441Ctrl + Shift + F587Ctrl + B
17Shift + F542Ctrl + Shift + F688Ctrl + K
18Shift + F643Ctrl + Shift + F789Ctrl + T
19Shift + F744Ctrl + Shift + F890Ctrl + Y
20Shift + F845Ctrl + Shift + F991Ctrl + X
21Shift + F946Ctrl + Shift + F1092Ctrl + C
22Ctrl + Shift + 047Ctrl + Shift + F1193Ctrl + V
23Shift + F1148Ctrl + Shift + F1294Shift + F10
24Shift + F1270Ctrl + E97Ctrl + #
25Ctrl + F171Ctrl + F

Examples:

KeywordAttributes
send_vkey8
send_vkeyCtrl + Shift + F1
send_vkeyCtrl + F7window=1

Sets the cell value for the specified cell of a GridView 'table_id' which is contained within a shell object.

Arguments

ArgumentTypeDefault value
table_idnull
row_numnull
col_idnull
textnull

Use the Scripting tracker recorder to find the 'col_id' of the cell to set.

Sets the delay time that is waited after each SapGui keyword.

Arguments

ArgumentTypeDefault value
speednull

The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second or 700 ms.

This functionality is designed to be used for demonstration and debugging purposes. It is not advised to use this keyword to wait for an element to appear or function to finish.

Possible time formats:

milisecondsmilliseconds, millisecond, millis, ms
secondsseconds, second, secs, sec, s
minutesminutes, minute, mins, min, m

Example:

KeywordAttributes
Set explicit wait1
Set explicit wait3 seconds
Set explicit wait500 ms

Sets the focus to the given element.

Arguments

ArgumentTypeDefault value
element_idnull

Takes a screenshot, only if 'screenshots on error' has been enabled, either at import of with keyword enable screenshots on error.

Arguments

ArgumentTypeDefault value
screenshot_namesap-screenshot

This keyword uses Robots' internal Screenshot library.

Removes selection of checkbox identified by locator. Does nothing if the checkbox is not selected.

Arguments

ArgumentTypeDefault value
element_idnull