Click Element

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

Arguments

Argument Type Default value Description
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.

Click Toolbar Button

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

Argument Type Default value Description
table_idnull
button_idnull

Connect To Existing Connection

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

Arguments

Argument Type Default value Description
connection_namenull

Connect To Session

Connects to an open session SAP.

Arguments

Argument Type Default value Description
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:

Keyword Attributes
connect to session
connect to session 3
connect to session explicit_wait=500ms

Disable Screenshots On Error

Disables automatic screenshots on error.

Doubleclick Element

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

Arguments

Argument Type Default value Description
element_idnull
item_idnull
column_idnull

Element Should Be Present

Checks whether an element is present on the screen.

Arguments

Argument Type Default value Description
element_idnull
messageNone

Element Value Should Be

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

Argument Type Default value Description
element_idnull
expected_valuenull
messageNone

Usage:

Element type possible values
textfield text
label text
titlebar text
button text on the button
checkbox checked / unchecked
radiobutton checked / unchecked
combobox text of the option to be expected

Element Value Should Contain

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

Arguments

Argument Type Default value Description
element_idnull
expected_valuenull
messageNone

Usage:

Element type possible values
textfield text
label text
titlebar text
button text on the button
combobox text of the option to be expected

Enable Screenshots On Error

Enables automatic screenshots on error.

Get Cell Value

Returns the cell value for the specified cell.

Arguments

Argument Type Default value Description
table_idnull
row_numnull
col_idnull

Get Element Location

Returns the Sap element location for the given element.

Arguments

Argument Type Default value Description
element_idnull

Get Element Type

Returns the Sap element type for the given element.

Arguments

Argument Type Default value Description
element_idnull

Get Row Count

Returns the number of rows found in the specified table.

Arguments

Argument Type Default value Description
table_idnull

Get Scroll Position

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

Arguments

Argument Type Default value Description
element_idnull

Get Value

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

Arguments

Argument Type Default value Description
element_idnull

Return values:

Element type Return values
textfield text
label text
checkbox checked / unchecked
radiobutton checked / unchecked
combobox text of the selected option
guibutton text
guititlebar text
guistatusbar text
guitab text

Get Window Title

Retrieves the window title of the given window.

Arguments

Argument Type Default value Description
locatornull

Input Password

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

Arguments

Argument Type Default value Description
element_idnull
passwordnull

Input Text

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

Arguments

Argument Type Default value Description
element_idnull
textnull

Maximize Window

Maximizes the SapGui window.

Arguments

Argument Type Default value Description
window0

Open Connection

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

Arguments

Argument Type Default value Description
connection_namenull

Run Transaction

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

Arguments

Argument Type Default value Description
transactionnull

Scroll

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

Arguments

Argument Type Default value Description
element_idnull
positionnull

Select Checkbox

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

Arguments

Argument Type Default value Description
element_idnull

Select Context Menu Item

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

Arguments

Argument Type Default value Description
element_idnull
menu_or_button_idnull
item_idnull

Select From List By Label

Selects the specified option from the selection list.

Arguments

Argument Type Default value Description
element_idnull
valuenull

Select Node

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

Arguments

Argument Type Default value Description
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.

Select Radio Button

Sets radio button to the specified value.

Arguments

Argument Type Default value Description
element_idnull

Select Table Column

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

Arguments

Argument Type Default value Description
table_idnull
column_idnull

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

Select Table Row

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

Argument Type Default value Description
table_idnull
row_numnull

Send Vkey

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

Argument Type Default value Description
vkey_idnull
window0

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

Sap Virtual Keys (on Windows)

VKey ID Key combination VKey ID Key combination VKey ID Key combination
0 Enter 26 Ctrl + F2 72 Ctrl + A
1 F1 27 Ctrl + F3 73 Ctrl + D
2 F2 28 Ctrl + F4 74 Ctrl + N
3 F3 29 Ctrl + F5 75 Ctrl + O
4 F4 30 Ctrl + F6 76 Shift + Del
5 F5 31 Ctrl + F7 77 Ctrl + Ins
6 F6 32 Ctrl + F8 78 Shift + Ins
7 F7 33 Ctrl + F9 79 Alt + Backspace
8 F8 34 Ctrl + F10 80 Ctrl + Page Up
9 F9 35 Ctrl + F11 81 Page Up
10 F10 36 Ctrl + F12 82 Page Down
11 F11 or Ctrl + S 37 Ctrl + Shift + F1 83 Ctrl + Page Down
12 F12 or ESC 38 Ctrl + Shift + F2 84 Ctrl + G
14 Shift + F2 39 Ctrl + Shift + F3 85 Ctrl + R
15 Shift + F3 40 Ctrl + Shift + F4 86 Ctrl + P
16 Shift + F4 41 Ctrl + Shift + F5 87 Ctrl + B
17 Shift + F5 42 Ctrl + Shift + F6 88 Ctrl + K
18 Shift + F6 43 Ctrl + Shift + F7 89 Ctrl + T
19 Shift + F7 44 Ctrl + Shift + F8 90 Ctrl + Y
20 Shift + F8 45 Ctrl + Shift + F9 91 Ctrl + X
21 Shift + F9 46 Ctrl + Shift + F10 92 Ctrl + C
22 Ctrl + Shift + 0 47 Ctrl + Shift + F11 93 Ctrl + V
23 Shift + F11 48 Ctrl + Shift + F12 94 Shift + F10
24 Shift + F12 70 Ctrl + E 97 Ctrl + #
25 Ctrl + F1 71 Ctrl + F

Examples:

Keyword Attributes
send_vkey 8
send_vkey Ctrl + Shift + F1
send_vkey Ctrl + F7 window=1

Set Cell Value

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

Arguments

Argument Type Default value Description
table_idnull
row_numnull
col_idnull
textnull

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

Set Explicit Wait

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

Arguments

Argument Type Default value Description
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:

miliseconds milliseconds, millisecond, millis, ms
seconds seconds, second, secs, sec, s
minutes minutes, minute, mins, min, m

Example:

Keyword Attributes
Set explicit wait 1
Set explicit wait 3 seconds
Set explicit wait 500 ms

Set Focus

Sets the focus to the given element.

Arguments

Argument Type Default value Description
element_idnull

Take Screenshot

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

Arguments

Argument Type Default value Description
screenshot_namesap-screenshot

This keyword uses Robots' internal Screenshot library.

Unselect Checkbox

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

Arguments

Argument Type Default value Description
element_idnull