Java APIs
_launchJavaWSApplication
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 7.0.0 | NA | NA | NA |
Available for modes: Java
_launchJavaWSApplication($applicationPath)
Arguments
$applicationPath | string | absolute path of JNLP specific application |
Returns
null |
Sahi Pro Flowcharts Action :Launch Java WSApplication
Details
Launch Java Web Start Application.
Launch Java Web Start Application.
_launchJavaWSApplication("C:/Users/SampleJavaWS.jnlp");
dangerDEPRECATED: _launchJavaWSApplication is deprecated since Sahi Pro Desktop Add-On 7.5.0. Use _launchJavaApplication instead.
_launchJavaApplication
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 7.5.0 | NA | NA | NA |
Available for modes: Java
_launchJavaApplication($applicationPath[, $applicationLaunchCommand[, $applicationType]])
Arguments
$applicationPath | string | absolute path of the Java application |
$applicationLaunchCommand | string optional | command to launch the Java application. |
$applicationType | string optional | parameter specifying the type of java application. |
Returns
null |
Sahi Pro Flowcharts Action :Launch Java Application
Details
Launch Java Application.
Launch Java Application.
_launchJavaApplication("C:/Users/sample.jar");
_launchJavaApplication("C:/Users/sample.jar", "java -jar");
_launchJavaApplication("C:/Users/sampleOracleApp.jar", "java -jar", "ORACLE");
_launchJavaApplication("C:/Users/sampleJavaFxApp.jar", "java -jar", "JAVAFX");
_launchJavaApplication("C:/Users/sample.jnlp");
_launchJavaApplication("C:/Users/SampleJavaWS.jnlp", "javaws");
infoNOTE: Pass "JAVAFX" as the $applicationType in order to automate any JavaFx application.
_launchBrowserForApplet
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 10.0.0 | NA | NA | NA |
Available for modes: Java
_launchBrowserForApplet($URL, $browserLaunchCommand)
Arguments
$URL | string | URL to launch the Applet |
$browserLaunchCommand | string | command to launch the browser for Applet. |
Returns
null |
Sahi Pro Flowcharts Action :Launch Browser For Applet
Details
Launch browser for Applet and open the specified URL. This API is required for Automating Applet Using Only Desktop Automation.
Launch browser for Applet and open the specified URL. This API is required for Automating Applet Using Only Desktop Automation.
_launchBrowserForApplet("https://www.test.example.com/login", "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe");
_launchBrowserForApplet("https://www.test.example.com/login", "C:/Program Files/Internet Explorer/iexplore.exe -private");
_exitJavaProcess
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 10.0.0 | NA | NA | NA |
Available for modes: Java
_exitJavaProcess()
Arguments
None |
Returns
null |
Sahi Pro Flowcharts Action :Exit Java Process
Details
Exits the Java Application process.
Use this api instead of _closeWindow if the java process is not exiting after closing the application manually or through Sahi Pro. This api helps to release resoures from machine.
Exits the Java Application process.
Use this api instead of _closeWindow if the java process is not exiting after closing the application manually or through Sahi Pro. This api helps to release resoures from machine.
_exitJavaProcess();
_dragNative
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 7.5.0 | NA | NA | NA |
Available for modes: Java
_dragNative($element)
Arguments
$element | element | element to be dragged |
Returns
null |
Sahi Pro Flowcharts Action :Drag Native
Details
Simulates a drag action
Simulates a drag action
// Drag the item
_dragNative(_jvJListItem(_jvJList("Countries"), "India"));
_dropNative
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 7.5.0 | NA | NA | NA |
Available for modes: Java
_dropNative($element)
Arguments
$element | element | element where the dragged element will be dropped |
Returns
null |
Sahi Pro Flowcharts Action :Drop Native
Details
Simulates a drop action
Simulates a drop action
// drop the item
_dropNative(_jvJTextArea(0));
// drag and drop action on same window
_selectWindow("Country List");
_dragNative(_jvJListItem(_jvJList("Countries"), "India"));
_dropNative(_jvJTextArea(0));
// drag and drop action on different window
_selectWindow("Country List");
_dragNative(_jvJListItem(_jvJList("Countries"), "India"));
_selectWindow("Application Form");
_dropNative(_jvJTextArea(0));
_getCellIndex
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 8.0.0 | NA | NA | NA |
Available for modes: Java
_getCellIndex($tableEl)
Arguments
$tableEl | element | Table element |
Returns
array of integers | array with first value as row index and second value as column index of the table. |
Sahi Pro Flowcharts Action :Get Cell Index
Details
var $cell = _getCellIndex(_jvCell(_jvJTable("SampleTable"), "43"));
_assertEqual(0, $cell[0]); // row number is 0 (i.e index 0 of $cell array).
_assertEqual(1, $cell[1]); // column number is 1 (i.e index 1 of $cell array).
_assertEqual("43", _getText(_jvCell(_jvJTable("SampleTable"), $cell[0], $cell[1]))); //Fetch value of table cell at [0,1].
_getIconPath
Since: | Sahi Pro | Desktop Add-On | Mobile Add-On | SAP Add-On | AI Assist Add-On |
NA | 8.0.0 | NA | NA | NA |
Available for modes: Java
_getIconPath($element)
Arguments
$element | element | Element whose icon's path we need |
Returns
string | Path of the graphic image that the element displays. |
Sahi Pro Flowcharts Action :Get Icon Path
Details
var $icon_path = _getIconPath(_jvJLabel("Success"));
_assertEqual("/success.png/", $icon_path);