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_id | null |
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_id | null | ||
button_id | null |
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_name | null |
Connect To Session
Connects to an open session SAP.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
explicit_wait | 0 |
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_id | null | ||
item_id | null | ||
column_id | null |
Element Should Be Present
Checks whether an element is present on the screen.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null | ||
message | None |
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_id | null | ||
expected_value | null | ||
message | None |
Usage:
Element type | possible values |
textfield | text |
label | text |
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_id | null | ||
expected_value | null | ||
message | None |
Usage:
Element type | possible values |
textfield | text |
label | text |
combobox | text of the option to be expected |
Enable Screenshots On Error
Enables automatic screenshots on error.
Focus And Click
Set focus into the element and click it.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | str | null | |
wait_time | float, None | None |
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
Focus And Input Text
Set focus into the element and input text into it.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | str | null | |
text | str | null | |
wait_time | float, None | None |
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
Generic Click Element
Performs a single click on a given element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null | ||
click_type | press |
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
Generic Input Password
Inserts the given password into the text field identified by locator.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null | ||
password | null |
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
Generic 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_id | null | ||
text | null |
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
Get Cell Value
Returns the cell value for the specified cell.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
table_id | null | ||
row_num | null | ||
col_id | null |
: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
Get Element Location
Returns the Sap element location for the given element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null |
Get Element Type
Returns the Sap element type for the given element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null |
Get Element Type Of Object
Returns the Sap element type for the given element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element | null |
:param element: SAP element :return: type of the SAP element
Get Row Count
Returns the number of rows found in the specified table.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
table_id | null |
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_id | null |
Get Statusbar Type
Retrieves the messageType in the statusbar the given window.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
window | str, None | wnd[0] |
Takes screenshot on error.
:param window: locator for the statusbar, default 'wnd[0]' :return: messageType of the /sbar element or empty string
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_id | null |
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 |
---|---|---|---|
locator | null |
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_id | null | ||
password | null |
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_id | null | ||
text | null |
Maximize Window
Maximizes the SapGui window.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
window | 0 |
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_name | null |
Run Transaction
Runs a Sap transaction. An error is given when an unknown transaction is specified.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
transaction | null |
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_id | null | ||
position | null |
Select Checkbox
Selects checkbox identified by locator. Does nothing if the checkbox is already selected.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null |
Select From List By Label
Selects the specified option from the selection list.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null | ||
value | null |
Select Node
Selects a node of a TableTreeControl 'tree_id' which is contained within a shell object.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
tree_id | null | ||
node_id | null | ||
expand | False |
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 Node Link
Selects a link of a TableTreeControl 'tree_id' which is contained within a shell object.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
tree_id | null | ||
link_id1 | null | ||
link_id2 | null |
Use the Scripting tracker recorder to find the 'link_id1' and 'link_id2' of the link to select.
Select Radio Button
Sets radio button to the specified value.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element_id | null |
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_id | null | ||
column_id | null |
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_id | null | ||
row_num | null |
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_id | null | ||
window | 0 |
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_id | null | ||
row_num | null | ||
col_id | null | ||
text | null |
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 |
---|---|---|---|
speed | null |
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_id | null |
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_name | sap-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_id | null |