SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Table of Contents

Core SDK Updated
Activities
Get Job Properties Highlight Area Keystroke Log Message Log Event Screenshot Execute Command Get Factory Variable Terminate Process Terminate Processes (Name) Wait Trigger as a New Job
Classes
Class Application Close Application Terminate Application Get Application Instance Count Application Exists Highlight Screen Elements Get Application Instance (Index) Select Application Instance Start Application Class WEBApplication Set Navigator Class WEBItem Execute Script (WEB UI Element) Script Element Generate HTML Event New Class Expandable Class Slider Class ScrollBar Class SplitButton Class MenuItem Click Menu Class ItemList Get Text All Elements (List) Count Element (List) Class ItemTable Get Column (Table) Get Row (Table) Class TreeItem Class ComboBox Class Tree Class Screen Screen Exists Activate Screen Close Screen Get Rectangle Highlight Screen Elements Maximize Screen Minimize Screen Refresh Screen Screen Keystroke Lock Refresh (Screen) Unlock Refresh (Screen) Start Advanced Listening Screen Stop Advanced Listening Screen Restore Window Screenshot (deprecated) Deprecated Screenshot Scroll Screen Set Screen Position Set Screen Title Set Application Control Visible Wait (Screen) Wait Close (Screen) Class Window Class WINScreen Click Menu Element (WIN) Is Screen Visible (WIN) Class WEBPage Execute Script (WEB) Get Focus Rectangle Previous URL Next URL Load URL Get Page URL Navigate New Screen (WEB) Scroll To (WEB) Scroll By (WEB) Start Web Page Class UIAutomationPage Listen Windows Events Open Connection Open Connection by Connection String Close Connection Class DataGrid Class Table Class Tab Class Header Class Menu Class MenuBar Class ToolBar Class List Get List Get Selected Element (List) Class RadioButton Class Radio Class CheckBox Select/Unselect Check Box Checked Class Hyperlink Class TabItem Class Button Class Input Class ProgressBar Class Spinner Class Edit Class Grid Class Template Class Word Class Line Class Paragraph Class Zone Class Thumb Class HeaderItem Class DataItem Class TitleBar Class StatusBar Class GroupBox Class Document Class Label Class Title Class Static Class ListItem Class Text Class Image Class Pane Class Group Class Separator Class Custom Class Element Set Element Click Click Sync Mouse Click (Element) Double Click (Element) Right Click (Element) Wait Change (Element) Exist Element Get Element Get Property (Element) Get Rectangle Highlight Element Is Enabled (Element) Is Visible (Element) Keystroke Element Refresh Element Select Element Set Focus Element Wait (Element) Get XML format (Element)
Automation Alerting
Base64 Encoding
Converters (JS, JSON, XML...)
Cryptography collection Updated
Data Type Management
Diagnostics
Enumerations and Constants Updated
Errors
File System (FS) Updated
File Transfer Protocol (FTP) Updated
Information
Clipboard
List Management
Monitoring
Mouse
Dialogs
Registry
HTTP Request
SAP GUI
Security
UIAutomation
Variable Management
Local Agent Variables
Local Agent Credentials
WMI Client

Module - Core SDK

Collection of core activities of SAP Intelligent RPA. Use them for accessing application screens and UI elements. Dedicated activities are available for connectors.

Author:
  • SAP Intelligent RPA R&D team

Activities

Get Job Properties

Retrieve properties of the current (ongoing) job, for example the ID of the package, or the name of the automation.


Technical Name Type Minimal Agent Version
getJobProperties asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
current irpa_core.jobProperties Properties of the current job. Check the ‘Job Properties’ data type to find the full list of the available properties.


Highlight Area

Highlight the area of a UI element previously declared for a given time (ms). It is usually helpful for focusing an end-user on a specific area during attended usage. It can be used for test purpose too.


Technical Name Type Minimal Agent Version
highlight synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
position irpa_core.position mandatory Position of the window. Check the ‘irpa_core.position’ data type to find the list of available properties.
timer number optional Highlight duration and wait in ms (0 by default).
visible boolean optional If set to false, the highlight is removed (true by default).
async boolean optional If set to true and combined with a timer parameter, the function is asynchronous: it returns immediately and the highlight is removed asynchronously after timer duration. True is the default value.
color number optional Color: "irpa_core.options.highlightColor" is the default color.

Output Parameters:

Name Type Description
result boolean Value.

Sample Code:

const pos = { x:.., y:.., cx:.., cy:..}; ctx.highlight(pos, 1000);



Keystroke

Send a set of pressed keys like a user keyboard on a focused application screen. Important: may require an unlocked Windows session.


Technical Name Type Minimal Agent Version
keyStroke asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
value string mandatory Sequence of pressed keys.
timer number optional Delay after the sequence of pressed keys (100 ms by default).

Sample Code:

await ctx.core.keyStroke(enums.key.Ctrl + enums.key.Shift +'A');



Log Message

Generate a log message within the tester and the trace file. Useful for setting up an automation. By default, a log will be "Information".


Technical Name Type Minimal Agent Version
log synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
message any mandatory Message to be displayed (text or object).
type irpa_core.enums.logType optional Icon type (by default "irpa_core.enums.logType.info").
label any optional Optional secondary message (text or object).

Sample Code:

ctx.log('function failed with error: ' + res, ctx.enums.logType.Error);



Log Event

Generate a log message within the Windows Event. Logs can be read using Windows Event Viewer. For further information about Windows Event, please see https://docs.microsoft.com/en-us/windows/win32/wes/windows-event-log


Technical Name Type Minimal Agent Version
logEvent synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
message string mandatory Message to add within Windows Event Viewer. It appears in ‘Windows Logs’ / 𠆊pplication’
type irpa_core.enums.logEventType optional Type of icon displayed with the message (Information, Warning, Error, etc…)

Sample Code:

ctx.logEvent('Function failed with error: ' + res, ctx.enums.logEventType.Error);



Screenshot

Make a screenshot of an application window or screen area and save it as a .PNG file. Different options are available depending on the provided parameters.


Technical Name Type Minimal Agent Version
screenshot synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
area irpa_core.screenshotPosition optional Screenshot area (or entire main screen if not set).
filePath string optional Filename of the screenshot. If not set, the name is generated on the format YYYYMMDD_HHMMSS_MS.png (ex.: 20150113_230806_416.png). File is generated in irpa_core.options.path.log +'/Pictures'
imgType irpa_core.enums.imgType optional Format of the screenshot: PNG (default) JPG, TIFF, or BMP.
imageQuality irpa_core.imageQuality optional Quality for TIFF or JPG formats.
captureRenderer irpa_core.enums.captureRenderer optional Print capture (default) or screenshot.

Sample Code:

ctx.screenshot({ x:50, y:30, cx:200, cy:100 }, 'c:\\temp\\myPopup.png'); ctx.screenshot();



Execute Command

Launch an application with the command line.


Technical Name Type Minimal Agent Version
shellexec synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
command string mandatory Command line to be executed. Standard system variables can be used (%programfiles(x86)%, %temp%, ...). For example, 'ping'.
param string optional Optional argument for the command line. For example, 'localhost'.
dir string optional Working directory.
flag string optional Display mode when application is started: Show, Hide, Maximized, Minimized... The default value is "irpa_core.enums.launchFlag.Show". See the "irpa_core.enums.launchFlag" enumeration for a complete list of flags.

Sample Code:

ctx.shellexec('%programfiles(x86)%\\Skype\\Phone\\Skype.exe', '/callto:echo123');



Get Factory Variable

Retrieve a variable from the Cloud Factory.


Technical Name Type Minimal Agent Version
getFactoryVariable asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
variableReference string mandatory Name of the variable.

Output Parameters:

Name Type Description
value any Variable value.


Terminate Process

Terminate a process with a specific ID.


Technical Name Type Minimal Agent Version
killProcess synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
processId number mandatory ID of the process in the task manager.

Output Parameters:

Name Type Description
result boolean True if terminated.


Terminate Processes (Name)

Terminate all the processes with the same name.


Technical Name Type Minimal Agent Version
killProcesses asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
name string mandatory Name of the processes you want to terminate.


Wait

Wait for a given delay (expressed in ms) between two activities for example. It can be useful if some UI elements cannot be detected or if some UI interactions are too fast. By adding wait, the overall automation duration may increase.


Technical Name Type Minimal Agent Version
waitTime asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
delay number optional Timer value in ms (default is 1000 ms).


Trigger as a New Job

Trigger a sub automation within your main automation. For example, in a workflow with multiple automations, a specific automation can be triggered at a different time. An automation can also be distributed to another agent than the one executing the main automation.


Technical Name Type Minimal Agent Version
addJob asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Default Description
automation irpa_core.jobParameters mandatory Job parameters.

Output Parameters:

Name Type Description
result irpa_core.addJobResult Result.




Class Application

Collection of activities to start or close applications previously captured.

Properties:

Name Type Description
name string application name
comment string application description
path string application launch path (as declared in Explorer)
customType string application custom type
nature irpa_core.enums.nature nature
server irpa_core.enums.server application server type (RDP, Citrix, M2M, ...)

Constructor Inputs:

Name Type Attributes Description
name string application name
obj any optional optional parameters (internal usage)

Minimal Agent Version:

WIN-2.0.0


Activities :

Close Application

Close the current screen of the running application. Prior to use this activity, ensure the application is in a correct status (transaction is properly finished for example).


Technical Name Type Minimal Agent Version
close asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
skipWait boolean optional If set to true, doesn't wait for application closure.

Sample Code:

await MyAppli.close();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Terminate Application

Terminate the process of an application.


Technical Name Type Minimal Agent Version
kill asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Returns true if the process of the application is terminated.


Get Application Instance Count

Retrieve the number of application instances.


Technical Name Type Minimal Agent Version
count synchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
application number Instance count.

Sample Code:

const nb = MyAppli.count();



Application Exists

Check if an application exists or not.


Technical Name Type Minimal Agent Version
exist synchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean True if the application exists, false otherwise.

Sample Code:

if (MyAppli.exist()) { ... }



Highlight Screen Elements

Highlight all UI elements within the current application screen. It is usually helpful for focusing an end-user on a specific area during attended usage. It can be used for debug purpose too.


Technical Name Type Minimal Agent Version
highlightItems synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
timer number optional Highlight duration and wait in ms (500 ms by default). If set to '0', the element remains highlighted.
visible boolean optional Enable/disable highlight (set to true by default).
async boolean optional If set to true, and a timer parameter is set, the function is asynchronous: it returns immediately and the highlight is removed asynchronously after the timer duration. This parameter is set to true by default.
color number optional Color: "irpa_core.options.highlightColor" is the default color.

Output Parameters:

Name Type Description
result boolean Value.

Sample Code:

MyAppli.MyPage.highlightItems();



Get Application Instance (Index)

Retrieve application instance from its index.


Technical Name Type Minimal Agent Version
getInstanceByIndex synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
index number optional Application index, sorted by launch order (starting by 0).

Output Parameters:

Name Type Description
application number Instance (-1 if not found).

Sample Code:

const instance = await $.MyAppli.getInstanceByIndex(0);



Select Application Instance

Select an application instance for the current running job.


Technical Name Type Minimal Agent Version
selectInstance synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
instance number optional Application instance to be selected.

Output Parameters:

Name Type Description
application number Instance (-1 if not found).

Sample Code:

await $.MyAppli.selectInstance($instance1);



Start Application

Start an application. If the application is already launched, the current screen will be activated. Otherwise, the parameter "shellexec" will be used for launching the application.


Technical Name Type Minimal Agent Version
start asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
path string optional Path to be executed (URL for Web applications). If the path is not mentioned, the targeted application path is used instead.
parameter string optional Optional complementary parameter to the path.
directory string optional Optional working directory. If not set, the current working directory is used.
flag irpa_core.enums.launchFlag optional [enums.launchFlag.Show] Launch flag.
bEvenIfExist boolean optional Starts the application even if it already exists (set to false by default).

Output Parameters:

Name Type Description
application number Instance.

Sample Code:

await MyAppli.start();

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid provided path


Class WEBApplication

Subset of activities related to the Web connector when working with a Web application.
Extends Technologies of the class
irpa_core.core.Application WEB


Activities :

Set Navigator

Select the navigator to be used to start a Web application (Edge by default).


Technical Name Type Minimal Agent Version
setNavigator synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
navigator irpa_core.enums.navigator Navigator choice.

Sample Code:

await MyAppli.setNavigator(irpa_core.enums.navigator.Chrome); // use Chrome for this application



Class WEBItem



Activities :

Execute Script (WEB UI Element)

Only for custom script.


Technical Name Type Minimal Agent Version
execScript asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
list Array. List of functions and parameters.
timeout number optional Timeout in ms.

Output Parameters:

Name Type Description
result string Value.

Sample Code:

function changeObject(element, obj) { if (element) { for (let id in obj) { element[id] = obj[id]; } } } MyWebAppli.MyPage.injectFunction(changeObject); res = await MyWebAppli.MyPage.oLogo.execScript(['changeObject', {src: ..., alt : ...}], 10000);

Errors:

Error Class Package Description
InvalidArgument irpa_core not properly provided function
Timeout irpa_core timout reached waiting element appearance


Technologies
WEB

Script Element

Modify the value of an element attribute (font, size, color, etc&#x2026 ).


Technical Name Type Minimal Agent Version
scriptItem asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
arg string Name of the element attribute to be modified.
arg2 string optional Value to be set to the element attribute.

Output Parameters:

Name Type Description
result string Element attribute value.

Sample Code:

// get an attribute const src = await MyWebAppli.MyPage.oLogo.scriptItem ('src'); await $.MyWebAppli.MyPage.oLogo.scriptItem ("src='http://....png'"); await $.MyWebAppli.MyPage.oLogo.scriptItem ('src="http://....png"', 'alt="..."'); await $.MyWebAppli.MyPage.oLogo.scriptItem ({src: 'http://....png', alt :'...', 'background-color': '#e8e8e8'}); const obj = {src: null, alt: null}; res = await $.MyWebAppli.MyPage.oLogo.scriptItem(obj); // returned 'obj' contains : {src: 'http://....png', alt :'...', }

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid first argument
Timeout irpa_core timout reached waiting element appearance


Technologies
WEB

Generate HTML Event New

Generate an HTML event on a specified element.


Technical Name Type Minimal Agent Version
trigger asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
event New irpa_core.enums.html.event Event to be triggered.

Output Parameters:

Name Type Description
result New any Value.


Technologies
WEB

Class Expandable

Expand Collapse


No specific activities for this class.

Class Slider

Subset activities related to Slider element.
Extends
irpa_core.core.Element


No specific activities for this class.

Class ScrollBar

Scroll To / Scroll By
Extends
irpa_core.core.Element


No specific activities for this class.

Class SplitButton

Extends Technologies of the class
irpa_core.core.Button WIN, UIAUTOMATION


No specific activities for this class.
Click
Extends Technologies of the class
irpa_core.core.CheckBox WIN, UIAUTOMATION


Activities :

Execute a 'click' action on a menu element. This activity will leverage native 'click' that may fall back to mouse click simulation.


Technical Name Type Minimal Agent Version
click synchronous WIN-2.0.0 (WIN for Windows)


Class ItemList



Activities :

Get Text All Elements (List)

Retrieve the text values as an array of a multi dimensional UI element.


Technical Name Type Minimal Agent Version
getAll asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
array Array. Text values as an array.

Sample Code:

let texts = await $.appli.page.item.getAll();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Count Element (List)

Return the count (length) of a UI element collection (mono dimension). For a multi dimension collection, use a custom code.


Technical Name Type Minimal Agent Version
count asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
count number Count of the element.

Sample Code:

let nb = await $.myAppli.screens.myScreen.elements.btEdit.count(); let nb = await $.myAppli.screens.myScreen.elements.oMap.i(0).count();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Class ItemTable

Extends
irpa_core.core.ItemList


Activities :

Get Column (Table)

Retrieve a list of values for a specified column as a simple string array.


Technical Name Type Minimal Agent Version
getCol asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
index number Column index.

Output Parameters:

Name Type Description
column Array. Values of the column.

Sample Code:

let texts = await $.appli.page.item.getCol(2);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Get Row (Table)

Retrieve a list of values for a specified row as a simple string array.


Technical Name Type Minimal Agent Version
getRow asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
index number Row index.

Output Parameters:

Name Type Description
row Array. Values of the row.

Sample Code:

const map = await myAppli.screens.myScreen.elements.oCells.getRow(2);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Class TreeItem

Extends
irpa_core.core.Element


No specific activities for this class.

Class ComboBox

Extends Technologies of the class
irpa_core.core.List WIN, UIAUTOMATION, WEB, SWG, OCR


No specific activities for this class.

Class Tree

Extends Technologies of the class
irpa_core.core.Table UIAUTOMATION, SAPGUI, OCR


No specific activities for this class.

Class Screen

Subset of activities related to application screens. Use to activate, close or check whether an application screen exists.

Properties:

Name Type Description
name string screen name
comment string screen description
path string screen launch path (as declared in Explorer)
customType string screen custom type
nature irpa_core.enums.nature nature
appli irpa_core.core.Application parent application


Activities :

Screen Exists

Test if a screen of an application exists or not.


Technical Name Type Minimal Agent Version
exist synchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Returns true if the screen exists.

Sample Code:

if ($.myAppli.screens.myScreen.exist()) { ... }



Activate Screen

Activate the screen of an application.


Technical Name Type Minimal Agent Version
activate asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await myAppli.screens.myScreen.activate();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Close Screen

Close the screen of an application.


Technical Name Type Minimal Agent Version
close asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
skipWait boolean optional If set to true, doesn't wait for screen closure.

Sample Code:

await $.myAppli.screens.myScreen.close();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG, OCR, HLLAPI, NSDK

Get Rectangle

Retrieve the position and bounding of a screen.


Technical Name Type Minimal Agent Version
getRect asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
position irpa_core.position Returns the position of the element.

Sample Code:

const obj = await myAppli.screens.myScreen.getRect();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Highlight Screen Elements

Highlight UI Elements within the current application screen. It is usually helpful for focusing an end-user on a specific area during attended usage. It can be used for debug purpose too.


Technical Name Type Minimal Agent Version
highlightItems synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
timer number optional Highlight duration and wait in ms (2000 ms by default). If set to '0', the element remains highlighted.
visible boolean optional Enable/disable highlight (set to true by default).
async boolean optional If set to true and combined with a timer parameter, the function is asynchronous: it returns immediately and the highlight is removed asynchronously after timer duration. True is the default value.
color number optional Color: "irpa_core.options.highlightColor" is the default color.

Output Parameters:

Name Type Description
result boolean Value.

Sample Code:

await myAppli.screens.myScreen.highlightItems();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Maximize Screen

Maximize the screen of an application.


Technical Name Type Minimal Agent Version
maximize asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.myAppli.screens.myScreen.maximize();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN, WEB, UIAUTOMATION

Minimize Screen

Minimize the screen of an application.


Technical Name Type Minimal Agent Version
minimize asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.myAppli.screens.myScreen.minimize();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN, UIAUTOMATION, WEB

Refresh Screen

Refresh the cache of the screen of a running application. To use when some screens have rendering delays and only a cache refresh may help in such context.


Technical Name Type Minimal Agent Version
refresh asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.MyUIAAppli.screens.MyScreen.refresh();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION, OCR, SAPGUI

Screen Keystroke

Send a sequence of pressed keys like a user keyboard on a focused application screen. Important: may require an unlocked Windows session.


Technical Name Type Minimal Agent Version
keyStroke asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
command string Key sequence or text to be sent (see irpa_core.enums.key).
alternate boolean optional Set to true to use the alternate keystroke method.
timer number optional Delay after key sequence (default is 100 ms).

Sample Code:

await $.myAppli.screens.myScreen.keyStroke(ctx.enums.key.Alt + ctx.enums.key.F7);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Lock Refresh (Screen)

Disable the polling refresh on a screen.


Technical Name Type Minimal Agent Version
lockRefresh asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await MyUIAAppli.MyScreen.lockRefresh();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION, SAPGUI

Unlock Refresh (Screen)

Enable the polling refresh on a screen.


Technical Name Type Minimal Agent Version
unlockRefresh synchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

MyUIAAppli.MyScreen.unlockRefresh();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION, SAPGUI

Start Advanced Listening Screen

Explicitly start the polling process by enabling or starting the SAP scripting. Call this method at the beginning of a workflow on the SAP Logon screen.


Technical Name Type Minimal Agent Version
startRefreshOnPolling asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await MyUIAAppli.screens.MyScreen.startRefreshOnPolling();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION, OCR, SAPGUI

Stop Advanced Listening Screen

Explicitly stop the polling process by stopping the SAP scripting. Call this method at the end of every workflow on the SAP Logon screen.


Technical Name Type Minimal Agent Version
stopRefreshOnPolling asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await MyUIAAppli.screens.MyScreen.stopRefreshOnPolling();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION, OCR, SAPGUI

Restore Window

Restore a minimized window of a screen in an application.


Technical Name Type Minimal Agent Version
restore asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Value.

Sample Code:

await $.myAppli.screens.myScreen.restore();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN, UIAUTOMATION

Screenshot (deprecated) Deprecated

(deprecated) Generate a screenshot of an application screen.


Technical Name Type Minimal Agent Version
screenshot asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
fileName string optional Filename to be generated.
raw boolean optional If set to true, makes a screenshot in 'raw' mode. Parameter set to false by default.

Sample Code:

await $.myAppli.screens.myScreen.screenshot(irpa_core.path.log + '\\MyAppli.png');

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Screenshot

Make a screenshot of an application window or screen area and save it as a PNG file. Different options are available depending on the provided parameters.


Technical Name Type Minimal Agent Version
screenshotEx asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
filePath string optional Filename of the screenshot. If not set, the name is generated on the format YYYYMMDD_HHMMSS_MS.png (ex.: 20150113_230806_416.png). File is generated in irpa_core.options.path.log +'/Pictures'
imgType irpa_core.enums.imgType optional Format of the screenshot: PNG (default) JPG, TIFF, or BMP.
imageQuality irpa_core.imageQuality optional Quality for TIFF or JPG formats.
captureRenderer irpa_core.enums.captureRenderer optional Print capture (default) or screenshot.
relativeArea irpa_core.relativePosition optional Relative position on application screen.

Sample Code:

await $.myAppli.screens.myScreen.screenshotEx(irpa_core.path.log + '\\MyAppli.png', irpa_core.enums.imgType.imgTypeTIFF, {tiffCompression: "compressionLZW"}, undefined, {width: 100, x: 25, y: 50, height: 50})

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Scroll Screen

Trigger a scroll on the current screen with a given offset. Positive value scrolls down, while negative value scrolls up


Technical Name Type Minimal Agent Version
scrollWheel asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
offset number Scroll wheel offset (positive value scrolls down, negative value scrolls up).

Sample Code:

await MyWebAppli.screens.MyScreen.scrollWheel(-200);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Set Screen Position

Set the screen size and position for an application screen.


Technical Name Type Minimal Agent Version
setPosition asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
X number Left position.
Y number Top position.
CX number Width.
CY number Height.

Sample Code:

await $.myAppli.screens.myScreen.setPosition(50, 50, 600, 400);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Set Screen Title

Update the title of an application screen.


Technical Name Type Minimal Agent Version
setTitle asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
title string

Sample Code:

await myAppli.screens.myScreen.setTitle('New title');

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Set Application Control Visible

Show or hide the built-in controls of an application. For advanced usage only. For example it will work with specific browsers by taking into account the browser syntax.


Technical Name Type Minimal Agent Version
setVisible asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
bVisible boolean Shows (true) or hides (false) the controls. Set to true by default.
barType irpa_core.enums.windowBarType optional Control of the Web browser to be shown/hidden (see irpa_core.enums.windowBarType). If this parameter isn&#x2019t set, the full screen is shown/hidden. Parameter only available for WEB technology.

Output Parameters:

Name Type Description
result string Value.

Sample Code:

await $.MyWinAppli.screens.MyScreen.setVisible(false); await $.MyWebAppli.screens.MyScreen.setVisible(false, ctx.enums.windowBarType.AddressBar);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Wait (Screen)

Wait until a screen is present and then call a callback. If the screen already exists, the callback is called immediately. Otherwise, it calls the callback on reception of a 'LOAD' event on the screen. The handler on the 'LOAD' event is set for a single time.


Technical Name Type Minimal Agent Version
wait asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
waitReload boolean optional If set to true, wait an effective reload even if the screen is present. This parameter is set to false by default.
delay number optional Optional delay to wait before calling the callback (default is 0).

Sample Code:

await $.myAppli.screens.myScreen.wait();



Wait Close (Screen)

Wait until a screen is closed and then call a callback. If the screen doesn't exist, the callback is called immediately. Otherwise, it calls the callback on reception of a 'UNLOAD' event on the screen. The handler on the 'UNLOAD' event is set for a single time.


Technical Name Type Minimal Agent Version
waitClose asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await myAppli.screens.myScreen.waitClose();



Class Window

Extends Technologies of the class
irpa_core.core.Screen UIAutomation, WIN


No specific activities for this class.

Class WINScreen

Subset of activities related to the WIN connector when working on an application screen.
Extends Technologies of the class
irpa_core.core.Screen WIN


Activities :

Click Menu Element (WIN)

Execute a 'click' action on the built-in menu inside an application based on its numeric identifier. Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
clickMenuItem synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
menuItem string Menu to be clicked.

Sample Code:

await MyWinAppli.screens.MyScreen.clickMenuItem('45'); // 45 is the menu numeric identifier

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN

Is Screen Visible (WIN)

Check whether an application screen is visible or not.


Technical Name Type Minimal Agent Version
isVisible asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Returns true if the screen is visible.

Sample Code:

if (await MyWinAppli.screens.MyScreen.isVisible()) { ... }

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN

Class WEBPage

Subset of activities related to the WEB connector when working on a Web page.
Extends Technologies of the class
irpa_core.core.Screen WEB


Activities :

Execute Script (WEB)

Execute JavaScript code in an application screen. You can use different syntaxes: provide a single block of code to be executed, or provide a list with function name, and the parameters to be used.


Technical Name Type Minimal Agent Version
execScript synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
list Array. Single block of code to be executed, or list of function name and the parameters to be used.
timeout number optional Timeout in ms.

Output Parameters:

Name Type Description
result string Value.

Sample Code:

await MyWebAppli.screens.MyScreen.execScript('ReconnectToHub();'); await MyWebAppli.screens.MyScreen.execScript(['SendAnswerToHub', req.info.destination.id, req.ev], 20000);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Get Focus Rectangle

Retrieve the position and bounding of the object containing the focus.


Technical Name Type Minimal Agent Version
getFocusRect asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result irpa_core.position Returns the position of the object.

Sample Code:

const obj = await MyWebAppli.screens.MyScreen.getFocusRect();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Previous URL

Load the previous URL from the history list.


Technical Name Type Minimal Agent Version
historyBack synchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Value.

Sample Code:

const title = await MyWebAppli.screens.MyScreen.historyBack();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Next URL

Load the next URL from the history list.


Technical Name Type Minimal Agent Version
historyForward synchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Value.

Sample Code:

const title = await MyWebAppli.screens.MyScreen.historyForward();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Load URL

Load a specific URL from the history list.


Technical Name Type Minimal Agent Version
historyGo synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
move number URL position in the history list: -1 goes back one page, 1 goes forward one page.

Output Parameters:

Name Type Description
result string Value.

Sample Code:

const title = await MyWebAppli.screens.MyScreen.historyGo(-2);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Get Page URL

Retrieve the URL of a page.


Technical Name Type Minimal Agent Version
getURL asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
url string URL.

Sample Code:

const url = myAppli.screens.myScreen.getURL();



Navigate New Screen (WEB)

Navigate to a new screen identified by a URL (the screen opens in a new tab).For further information about this activity, please see https://msdn.microsoft.com/en-us/library/aa752093(v=vs.85).aspx


Technical Name Type Minimal Agent Version
navigate asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
url string Expression of the URL, full path, or UNC location and name of the screen to display.
dest irpa_core.enums.targetFrame optional Expression of the name of the frame in which to display the screen (see irpa_core.enums.targetFrame).
post string optional Data that is sent to the server as part of an HTTP POST transaction. A POST transaction is typically used to send data gathered by an HTML form. If this parameter doesn&#x2019t specify any post data, this method issues an HTTP GET transaction. This parameter is ignored if the URL is not an HTTP URL.
header string optional String that contains additional HTTP headers to send to the server. These headers are added to the default Internet Explorer headers. For example, headers can specify the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if the URL is not an HTTP URL.

Output Parameters:

Name Type Description
result string Value.

Sample Code:

await $.MyWebAppli.screens.MyScreen.navigate('http://www....', ctx.enums.targetFrame.Blank);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WEB

Scroll To (WEB)

Scroll a web page to the specified coordinates.


Technical Name Type Minimal Agent Version
scrollTo asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
xpos number Coordinates (in pixels) to scroll to, along the x-axis (horizontal).
ypos number Coordinates (in pixels) to scroll to, along the y-axis (vertical).

Output Parameters:

Name Type Description
result string Value.

Sample Code:

await MyWebAppli.screens.MyScreen.scrollTo(0, 0); // scrolls to the top of the page

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WEB

Scroll By (WEB)

Scroll the web page by the specified number of pixels.


Technical Name Type Minimal Agent Version
scrollBy asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
xnum number Number of pixels to scroll by, along the x-axis (horizontal). Positive values will scroll to the left, while negative values will scroll to the right.
ynum number Number of pixels to scroll by, along the y-axis (vertical). Positive values will scroll down, while negative values will scroll up.

Sample Code:

await MyWebAppli.screens.MyScreen.scrollBy(100, 0); // Scroll the document by 100px horizontally

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WEB

Start Web Page

Start an application or Web URL if the specified screen is not launched. If the screen already exists, nothing is executed. If a Web application is started, a navigation to the specified screen of a Web application is executed.


Technical Name Type Minimal Agent Version
start synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
url string optional URL to be used to open the screen. If the URL is not mentioned, the launch URL of the targeted Web screen is used instead.
navigator irpa_core.enums.navigator optional Optional navigator choice (Edge by default).
flag irpa_core.enums.launchFlag optional Launch flag.
bEvenIfExist boolean optional Starts the screen even if it already exists (set to false by default).

Output Parameters:

Name Type Description
result number Application instance.

Sample Code:

await $.myAppli.screens.myScreen.start();

Sample Code:

await $.myAppli.screens.myScreen.start(null, null, null, ctx.enums.launchFlag.ShowMaximized);

Sample Code:

await $.myAppli.screens.myScreen.start('http://www.dokuwiki.org/');

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid provided url


Class UIAutomationPage

Extends Technologies of the class
irpa_core.core.Screen UIAutomation


Activities :

Listen Windows Events

Listen to WinEvents.


Technical Name Type Minimal Agent Version
listenWinEvents asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Value.

Sample Code:

const name = MyUIAAppli.screens.MyScreen.listenWinEvents();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Open Connection

Open a connection to a SAP GUI system via the connection name.


Technical Name Type Minimal Agent Version
openConnection synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
connectionName string Connection Name to be opened. Eg: QKX [PUBLIC]

Sample Code:

MyUIAAppli.MyScreen.openConnection();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance
InvalidArgument irpa_core invalidArgument provide value for parameter connectionName


Technologies
UIAUTOMATION

Open Connection by Connection String

Open a connection to a SAP GUI system via a connection string.


Technical Name Type Minimal Agent Version
openConnectionByString synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
connectionString string Connection string of the connection to be opened. Eg: /H/172.16.64.17/S/3200

Sample Code:

MyUIAAppli.MyScreen.openConnectionByString();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance
InvalidArgument irpa_core invalidArgument provide value for parameter connectionName


Technologies
UIAUTOMATION

Close Connection

Close a connection previously opened with a 'Open Connection' activity.


Technical Name Type Minimal Agent Version
closeConnection synchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

MyUIAAppli.MyScreen.closeConnection();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
UIAUTOMATION

Class DataGrid

Extends Technologies of the class
irpa_core.core.Table WIN, UIAUTOMATION, SWG


No specific activities for this class.

Class Table

Extends Technologies of the class
irpa_core.core.List WIN, UIAUTOMATION, SWG


No specific activities for this class.

Class Tab

Extends
irpa_core.core.List


No specific activities for this class.
Extends
irpa_core.core.List


No specific activities for this class.
Extends
irpa_core.core.List


No specific activities for this class.
Extends
irpa_core.core.List


No specific activities for this class.

Class ToolBar

Extends
irpa_core.core.List


No specific activities for this class.

Class List

Subset of activities related to list elements.
Extends Technologies of the class
irpa_core.core.Element WIN, UIAUTOMATION, SWG, OCR


Activities :

Get List

Retrieve the list of value in the tree view or list view.


Technical Name Type Minimal Agent Version
getList asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
list Array. Array of values (or array of array for tables/grids).

Sample Code:

let texts = await $.appli.page.tvList.getList();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Technologies
WIN, UIAUTOMATION, SWG

Get Selected Element (List)

Retrieve the current selected value in the tree view or list view.


Technical Name Type Minimal Agent Version
selected asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Text

Sample Code:

let val = await $.myAppli.screens.myScreen.elements.tvList.selected());

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG, WEB, WEB3

Class RadioButton

Extends
irpa_core.core.CheckBox


No specific activities for this class.

Class Radio

Extends
irpa_core.core.CheckBox


No specific activities for this class.

Class CheckBox

Subset of activities related to Check Box Element.
Extends Technologies of the class
irpa_core.core.Button WIN, UIAUTOMATION, WEB, SWG, OCR


Activities :

Select/Unselect Check Box

Check or uncheck a radio button, check box, or check box of a tree view for a specified UI element.


Technical Name Type Minimal Agent Version
check asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
set boolean optional Set to true to check, or set to false to uncheck.
value string optional Name of the element in a tree view to be selected or unselected.

Output Parameters:

Name Type Description
result string Returns true if checked.

Sample Code:

await $.myAppli.screens.myScreen.elements.oNAS.check(true); await $.myAppli.screens.myScreen.elements.tvTree.check(true, 'Network');

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG

Checked

Retrieve checked state.


Technical Name Type Minimal Agent Version
checked asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Result.

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Extends
irpa_core.core.Button


No specific activities for this class.

Class TabItem

Extends
irpa_core.core.Button


No specific activities for this class.

Class Button

Subset of activities related to Button element.
Extends Technologies of the class
irpa_core.core.Element WIN, UIAUTOMATION, WEB, SWG, OCR


No specific activities for this class.

Class Input

Extends
irpa_core.core.Edit


No specific activities for this class.

Class ProgressBar

Extends
irpa_core.core.Edit


No specific activities for this class.

Class Spinner

Extends
irpa_core.core.Edit


No specific activities for this class.

Class Edit

Set
Extends
irpa_core.core.Element


No specific activities for this class.

Class Grid

Extends Technologies of the class
irpa_core.core.Zone OCR


No specific activities for this class.

Class Template

Extends Technologies of the class
irpa_core.core.Zone OCR


No specific activities for this class.

Class Word

Extends Technologies of the class
irpa_core.core.Zone OCR


No specific activities for this class.

Class Line

Extends Technologies of the class
irpa_core.core.Zone OCR


No specific activities for this class.

Class Paragraph

Extends Technologies of the class
irpa_core.core.Zone OCR


No specific activities for this class.

Class Zone

Extends Technologies of the class
irpa_core.core.Element OCR


No specific activities for this class.

Class Thumb

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class HeaderItem

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class DataItem

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class TitleBar

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class StatusBar

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class GroupBox

Extends Technologies of the class
irpa_core.core.Document UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class Document

Extends Technologies of the class
irpa_core.core.Element UIAUTOMATION, SAPGUI, WIN


No specific activities for this class.

Class Label

Extends
irpa_core.core.Text


No specific activities for this class.

Class Title

Extends
irpa_core.core.Text


No specific activities for this class.

Class Static

Extends
irpa_core.core.Text


No specific activities for this class.

Class ListItem

Extends
irpa_core.core.Text


No specific activities for this class.

Class Text

Get
Extends
irpa_core.core.Element


No specific activities for this class.

Class Image

Extends
irpa_core.core.Element


No specific activities for this class.

Class Pane

Extends
irpa_core.core.Element


No specific activities for this class.

Class Group

Extends
irpa_core.core.Element


No specific activities for this class.

Class Separator

Extends
irpa_core.core.Element


No specific activities for this class.

Class Custom

Extends
irpa_core.core.Element


No specific activities for this class.

Class Element

Collection of activities to trigger, retrieve or define UI elements previously declared. For instance, click, get, set...

Properties:

Name Type Description
name string element name
comment string element description
path string element launch path (as declared in Explorer)
customType string element custom type
appli irpa_core.core.Application parent application
page irpa_core.core.Screen parent page/screen
occurs number occurence level (0, 1 or 2)

Constructor Inputs:

Name Type Attributes Description
name string item name
parent irpa_core.core.Screen parent page
obj any optional initialization object
instance string optional item instance
dynamic boolean optional statically or dynamically declared item

Minimal Agent Version:

WIN-2.0.0


Activities :

Set Element

Set the value of a UI element. Important: may require an unlocked Windows session.


Technical Name Type Minimal Agent Version
set asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
value string Value of the element to be set.
testExist boolean optional If set to true, tests the existence of the element before setting a value.
ifDefined boolean optional Value is defined only if this parameter is set to true.

Sample Code:

await $.myAppli.screens.myScreen.elements.MyItem.set(data.edName);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Click

Execute a 'click' action on a button. This function will leverage native 'click' that may fall back to mouse click simulation.


Technical Name Type Minimal Agent Version
click asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
bMouse boolean optional If set to true, the action simulates a 'mouse' click.
X number optional Relative horizontal position (compared to object top left position).
Y number optional Relative vertical position (compared to object top left position).

Sample Code:

await $.myAppli.screens.myScreen.elements.btSearch.click (); await $.myAppli.screens.myScreen.elements.btSearch.click(true);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG, OCR

Click Sync

Execute a 'click' action on a button synchronously. This activity will leverage a native 'click' that may fall back to a mouse click simulation.


Technical Name Type Minimal Agent Version
clickSync asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.myAppli.screens.myScreen.elements.btSearch.clickSync();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
UIAUTOMATION

Mouse Click (Element)

Execute a 'click' action on a UI element. This activity will leverage native 'click' that may fall back to mouse click simulation. Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
clickMouse asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.myAppli.screens.myScreen.elements.btOK.clickMouse();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG, OCR

Double Click (Element)

Execute a 'double-click' action on a given UI element (such as a button) previously captured. A position (X,Y) can be set if needed, otherwise the action will happen in the center of the UI element. Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
clickDouble asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
X number optional Relative horizontal position (compared to object top-left position).
Y number optional Relative vertical position (compared to object top-left position).

Sample Code:

await $.myAppli.screens.myScreen.elements.btOK.clickDouble(x,y); await $.myAppli.screens.myScreen.elements.btSearch.clickDouble(30, 20);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG, OCR

Right Click (Element)

Execute a 'right-click' action on a UI element (button etc). A position (X,Y) can be set if needed, otherwise the action will happen in the center of the UI Element. Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
clickRight asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
bMouse boolean optional If set to true, the action simulates a 'right mouse' click.
X number optional Relative horizontal position (compared to object top-left position).
Y number optional Relative vertical position (compared to object top-left position).

Sample Code:

await $.myAppli.screens.myScreen.elements.btSearch.clickRight(); await $.myAppli.screens.myScreen.elements.btSearch.clickRight(true, 30, 20);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG, OCR

Wait Change (Element)

Wait until the content of a given UI element has changed. Usually better than a fixed wait for detecting UI changes and readiness.


Technical Name Type Minimal Agent Version
waitChange asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
initialValue string optional Initial text value of the element to wait for a change.
timeout number optional Maximum time (in ms) to wait for the change (10000 ms by default).

Errors:

Error Class Package Description
Timeout irpa_core No change before timeout. Check timeout value.


Exist Element

Check whether a UI element is rendered within an application screen. It can be useful to detect some mandatory UI elements before proceeding.


Technical Name Type Minimal Agent Version
exist asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
exist boolean Returns true if the element exists.

Sample Code:

if (myAppli.screens.myScreen.elements.btSearch.exist()) { ... }

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting screen appearance


Get Element

Retrieve the value (raw value) of a UI element. For instance, the label of a form, the content of a text area...


Technical Name Type Minimal Agent Version
get asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
text string Returns the text value of the element.

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Get Property (Element)

Retrieve the value of a UI element property.


Technical Name Type Minimal Agent Version
getProperty synchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
name string Name of the element property to retrieve.

Output Parameters:

Name Type Description
prop string Returns the value of the element property.

Sample Code:

const name = myAppli.screens.myScreen.elements.tvList.getProperty('Name');



Technologies
UIAUTOMATION, WEB, OCR

Get Rectangle

Retrieve the position and bounding of an element.


Technical Name Type Minimal Agent Version
getRect asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
position irpa_core.position Returns the position of the element.

Sample Code:

let r = await myAppli.screens.myScreen.elements.edSearch.getRect();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Highlight Element

Highligh a UI element previously declared for a given time (ms). It is usually helpful for focusing an end-user on a specific area during attended usage. It can be used for debug purpose too. Additional properties are available.


Technical Name Type Minimal Agent Version
highlight asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
timer number optional Highlight duration and wait in ms (500 ms by default). If set to '0', the element remains highlighted.
visible boolean optional Enable/disable highlight (set to true by default).
async boolean optional If set to true, and a timer parameter is set, the function is asynchronous: it returns immediately and the highlight is removed asynchronously after the timer duration. This parameter is set to true by default.
color number optional Color: "irpa_core.options.highlightColor" is the default color.

Sample Code:

await myAppli.screens.myScreen.elements.MyItem.highlight();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG, OCR, SAPGUI

Is Enabled (Element)

Check if a UI element is enabled or not.


Technical Name Type Minimal Agent Version
isEnabled asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Returns true if the element is enabled.

Sample Code:

if (await myAppli.screens.myScreen.elements.btSearch.isEnabled()) { ... }

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG

Is Visible (Element)

Check if a UI element is visible or not.


Technical Name Type Minimal Agent Version
isVisible asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result boolean Returns true if the element is visible.

Sample Code:

if (await myAppli.screens.myScreen.elements.btSearch.isVisible()) { ... }

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG

Keystroke Element

Send a sequence of pressed keys like a user keyboard on a focused application element. Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
keyStroke asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
command string Key sequence or text to be sent (see irpa_core.enums.key).
alternate boolean optional Set to true to use the alternate keystroke method.
timer number optional Delay after key sequence (default is 100 ms).

Sample Code:

await $.myAppli.screens.myScreen.elements.edSearch.set(searchAddress); await $.myAppli.screens.myScreen.elements.edSearch.keyStroke(ctx.enums.key.Enter);

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, WEB, SWG, OCR

Refresh Element

Refresh the cache of a UI element. To use when some UI elements have rendering delays and only a cache refresh may help in such context. Only available for the UI Automation connector.


Technical Name Type Minimal Agent Version
refresh asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.MyUIAAppli.MyPage.tvList.refresh();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
UIAUTOMATION

Select Element

Select or unselect an element in a tree view with a boolean value.


Technical Name Type Minimal Agent Version
select asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
value string optional Element selected when set to true, unselected when set to false.
set boolean optional Name of the element in a tree view to be selected or unselected.

Sample Code:

await $.myAppli.screens.myScreen.elements.tvList.select('Network');

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SWG, WEB, WEB3

Set Focus Element

Set the focus on a UI element. Usually the context is implicit, however some UI connectors may require an explicit focus prior to perform an action (such as Set or Click). Important: May require an unlocked Windows session.


Technical Name Type Minimal Agent Version
setFocus asynchronous WIN-2.0.0 (WIN for Windows)

Sample Code:

await $.myAppli.screens.myScreen.elements.MyItem.setFocus();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Wait (Element)

Wait until a UI element is present and then call a callback. If the element already exists, the callback is called immediately. Otherwise, polling is triggered to loop on element existence.


Technical Name Type Minimal Agent Version
wait asynchronous WIN-2.0.0 (WIN for Windows)

Input Parameters:

Name Type Attributes Description
timeout number optional Optional timeout duration for the polling (default is 30s).

Sample Code:

await myAppli.screens.myScreen.elements.MyItem.wait();



Get XML format (Element)

Retrieve the value of a UI element in XML format rather than the raw value.


Technical Name Type Minimal Agent Version
xml asynchronous WIN-2.0.0 (WIN for Windows)

Output Parameters:

Name Type Description
result string Returns the string containing the value of the element in XML format.

Sample Code:

let strXml = await $.myAppli.screens.myScreen.elements.edName.xml();

Errors:

Error Class Package Description
Timeout irpa_core timout reached waiting element appearance


Technologies
WIN, UIAUTOMATION, SVG, OCR