Env
The env module provides some contextual information for flows.
Username
Get the username for the current user.
Example
var u = Env.userName;
Name of machine
Get the name of the machine.
Example
var m = Env.machineName;
Domain
Get the domain for the current user.
Example
var u = Env.userDomain;
Groups
Get the AD groups for the current user. Includes user name and machine name.
Example
var groups = Env.userGroups;
groups
will now be an array
of strings.
Primary screen
Get information about the primary screen of the local machine.
Example
var s = Env.primaryScreen;
s
will now be an object
like so:
// s
{
width: 1024,
height: 768,
primary: true
}
Screens
Get information about all the screens attached to the local machine.
Example
var screens = Env.screens;
screens
will now be an array
of screen objects, like so:
// screens
[
{
width: 1024,
height: 768,
primary: true
},{
width: 1280,
height: 1024,
primary: false
}
]
Version
Get the Manatee version.
var v = Env.version;
Branch
Get the branch of Manatee - can indicate whether its a production or testing version for example.
var branch = Env.branch;
Session type
Get the current type of windows user session. This allows a flow to know the type of user session it is running under.
Returns one of the following values
remotedesktop
: The flow is running on a manatee operated through remote desktop clientcitrix
: The flow is running on a manatee operated through a citrix clientnormal
: The flow is running on a manatee that is operated via a normal local login
if (Env.sessionType !== 'normal') throw Error('Remote automation not supported by this flow!');
Connected
Returns which services Manatee is connected to.
var c = Env.connected;
// c is e.g. { kwanza: true } if connected to kwanza
Kwanza
This method returns Kwanza’s about information.
Env.kwanza();
will give you e.g.:
{
"Name": "f5d4e5973c5c-c38suabhjrp000cgmri0",
"Version": "v3.0.3-3-g222c7f9",
"Color": "orange",
"Features": [
"user-management"
],
"Env": {
"name": "",
"icon": "",
"color": ""
}
}
Webview runtime info
This property provides information about available WebView2 runtime installations, which are used for embedded Edge browser components such as certain sticky components, input dialogs and the built-in Cuesta window.
var webviewInfo = Env.webviewInfo;
will give you e.g.:
[
{
"path": "C:\\USERS\\LOS\\APPDATA\\ROAMING\\SIRENIA\\MANATEE\\PLUGINS\\KANTPLUGIN\\1.0.0\\Kant\\WebView2",
"version": "103.0.1264.37"
},
{
"path": "system",
"version": "103.0.1264.44"
}
]
Depending on its configuration, Manatee may provide its own webview installation or a plugin might provide it. The entry in the result array with the path system
is provided by Microsoft’s own webview installer and is used if no other webview is available.