Constructor
new ZFE(opts)
ZFE constructor. While both target
and headless
can be provided, only one or
the other is required for construction.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
Properties
|
Methods
connect() → {Promise}
Connect to the Host Access for the Cloud session server. If the user's login credentials are passed in on the constructor, the user will logged in automatically after successful connection.
Returns:
Promise which resolves when the SDK is connected and ready for use.
- Type
- Promise
disconnect() → {Promise}
Log out and disconnect the SDK from the Host Access for the Cloud session server.
Returns:
Promise that resolves when logout request has been sent.
- Type
- Promise
getSessionManager() → {SessionManager}
Provides basic session management functions. Throws an error if the session manager is not initialized.
Throws:
-
If the session manager is not initialized.
- Type
- Error
Returns:
The session manager instance.
- Type
- SessionManager
getMacroManager(session) → {MacroManager}
To interact with macros for the given session.
Parameters:
Name | Type | Description |
---|---|---|
session |
Session |
Returns:
- Type
- MacroManager
Events
Event.ERROR
Fired when an error occurs.
Parameters:
Name | Type | Description |
---|---|---|
message |
String | The error message. |