on ‎2020 Jan 22 10:49 PM
Scenario
I am able to trigger a javascript file from command line like this:
test1.js
application.openConnectionByConnectionString("conn=/H/10.10.10.100/S/3200&expert=true");
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-MANDT").text = "220";
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-MANDT").setFocus();
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-MANDT").caretPosition = 3;
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-BNAME").text = "username";
// The text of a password field is not recorded. Either enter a valid password or delete the following line
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/pwdRSYST-BCODE").text = "secret";
application.findById("/app/con[0]/ses[0]/wnd[0]").resizeWorkingPane(181,35,false);
application.findById("/app/con[0]/ses[0]/wnd[0]").sendVKey(0);
application.findById("/app/con[0]/ses[0]/wnd[0]/tbar[0]/okcd").text = "/nex";
application.findById("/app/con[0]/ses[0]/wnd[0]").sendVKey(0);
#!/bin/bash
export SAPGUIDIR="/Applications/SAP Clients/SAPGUI 7.50rev5/SAPGUI 7.50rev5.app/Contents/Resources"
export WORKDIR=`pwd` # this is where the script file is located
cd "${SAPGUIDIR}"
echo "[DEBUG] starting..."
java \
-cp Java/GuiStartS.jar com.sap.platin.Gui \
-n \
-b \
-f ${WORKDIR}/test1.js
echo "[DEBUG] done!"
Problem
JavaGUI does not quit. There is a popup that says "The script has successfully completed its execution".
If I run the command again, I get another copy of JavaGUI running ...
How can I get JavaGUI to quit completely?
Please could anyone share a link to the full JavaScript API?
Request clarification before answering.
For SAP GUI Scripting API please refer to
https://help.sap.com/viewer/b47d018c3b9b45e897faf66a6c0885a8/760.00/en-US
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.