_SapSession

Updated at:

input_text

input_text(element, value)

Method description

Enters text into a control.

Description

element<str>: The name of the control.

value<str>: The content to enter.

Example call: rpa.app.sap._SapSession.input_text

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.input_text("Transaction Code Input Box", "FB50")

click

click(element)

Method description

Clicks a control.

Parameters

element<str>: The name of the control.

Call example: rpa.app.sap._SapSession.click

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.click("Execute Button")

text

text(element)

Method description

Retrieves the content of a control.

Parameters

element<str>: The name of the control.

Call Example: rpa.app.sap._SapSession.text

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.text("Transaction Processing Option")

check

check(element, value=None)

Method description

Verify

Parameters

element<str>: The name of the control.

value<bool>: Specifies whether to select the control.

Sample Call: rpa.app.sap._SapSession.check

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

check_flag = sap_session.check("Checkbox Button")
sap_session.check("Checkbox Button", value=False)

option

option(element, value, key=None)

Method description

Make a selection.

Parameters

element<str>: The name of the control.

value<str>: The text of the option to select.

key<str>: The key value of the option to select.

Call Example: rpa.app.sap._SapSession.option

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.option("Dropdown Control")

open_dialog

open_dialog(element)

Method description

Opens the dialog box for a control.

Description

element<str>: The name of the control.

Call Example: rpa.app.sap._SapSession.open_dialog

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.open_dialog("Dialog Box Control")

send_vkey

send_vkey(element, vkey)

Method description

Sends a keyboard shortcut to a specified control.

Parameters

element<str>: The name of the control.

vkey<int>: The virtual key code for the keyboard shortcut.

Call Example: rpa.app.sap._SapSession.send_vkey

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# This method stores SAP keyboard shortcuts as corresponding numbers. Hover the mouse over the method name to view the corresponding keyboard shortcuts.
# The following code provides an example of how to call the method. In this example, the Enter key is sent.
sap_session = rpa.app.sap.session(win_title="SAPXX")

sap_session.send_vkey("Transaction Code Input Box", 0)

find

find(element)

Method description

Retrieves the native handle of a specified SAP control.

Parameters

element<str>: The name of the control.

Sample Call: rpa.app.sap._SapSession.find

# Note: This method operates on an SAP session object. First, use the control capture feature to capture the page element that you want to operate on.
# The following code provides an example of how to call the method:
sap_session = rpa.app.sap.session(win_title="SAPXX")

raw_element = sap_session.find("Execute Button")