Package pysapscript
+Description
+SAP scripting for Python automatization
+Documentation
+Github - https://github.com/kamildemocko/PySapScript
+Installation
+pip install pysapscript
+
+Usage
+Create pysapscript object
+pss = pysapscript.Sapscript()
+
+parameter default_window_title: = "SAP Easy Access"
Launch Sap
+pss.launch_sap(
+ sid="SQ4",
+ client="012",
+ user="robot_t",
+ password=os.getenv("secret_password")
+)
+
+additional parameters:
+root_sap_dir = Path(r"C:\Program Files (x86)\SAP\FrontEnd\SAPgui")
+maximise = True
+quit_auto = True
+
+Attach to window:
+window = pss.attach_window(0, 0)
+
+positional parameters (0, 0) -> (connection, session)
+Quitting SAP:
+-
+
- will automatically quit if not specified differently +
- manual quitting:
pss.quit()
+
Performing action:
+use SAP path starting with wnd[0]
for element argumetns
window.write(element, value)
+window.press(element)
+window.select(element)
+window.read(element)
+window.read_shell_table(element)
+window.press_shell_button(element, button_name)
+window.change_shell_checkbox(element, checkbox_name, boolean)
+window.select_shell_rows(element, [0, 1, 2])
+html_content = window.read_html_viewer(element)
+
+Another available actions…
+-
+
- close window, open new window, start transaction, navigate, maximize +
+Expand source code +
+"""
+.. include:: ../README.md
+"""
+Sub-modules
+-
+
pysapscript.pysapscript
+- + + +
pysapscript.shell_table
+- + + +
pysapscript.types_
+- + + +
pysapscript.utils
+- + + +
pysapscript.window
+- + + +