Kant Plugin
This plugin provides an embedded Edge browser along with an associated app type so web pages can be automated. It mostly works the same as the Legacy Hosted Chrome app as well as the Krom plugin which also wraps a chrome browser.
This plugin is supported in Manatee v1.28+.
System requirements
This plugin requires the WebView2 Runtime to be installed. The installer comes as a free download from Microsoft. See here
Setting up for automation in Manatee 1.28
There are a number of steps involved in order to successfully launch and attach a web app using this plugin. They are summarized in the following checklist:
- Identify set of groups for machines that should have the plugin (GROUPS)
- Identify headless app (HEADLESS_APP) that can be used for starting the plugin and the browser
- Create headless flow (PLUGIN_START) for starting the plugin
- Set GROUPS on HEADLESS_APP and PLUGIN_START
- Register hosted edge plugin app type in cuesta via a manatee with the running plugin (if the app type isn’t already made available)
- Create headless flow (EDGE_START) in HEADLESS_APP for launching the browser (and reload Cuesta)
- Add
url
input parameter to EDGE_START flow - Set up a Manatee Boot trigger on PLUGIN_START
- Create plugin-edge-app (PLUGIN_EDGE_APP)
- Set GROUPS on PLUGIN_EDGE_APP
- Set
Launch With
to something like `manatee:runflow/withname/PLUGIN_START?url=https:%3A%2F%2Fdr.dk - Set
Executable-path contains
toKant.exe
- Set
Title bar contains
to the launch url
PLUGIN_START flow
This flow gets run after Manatee startup and is responsible for starting the plugin. Note that it references the plugin version, so when updating the plugin, this flow needs to change.
var kantVersion = '0.0.24';
try {
Plugin.start('KantPlugin', 'v' + kantVersion, {
'[eu.sirenia]CurrentWorkingDirectory': ('%appdata%\\Sirenia\\Manatee\\plugins\\KantPlugin\\' + kantVersion).toString()
});
//Notification.show('kant', 'Plugin started', 'KantPlugin v' + kantVersion, { timeout: 3 });
} catch(e) {
Notification.show('kant', 'Plugin failed to start', e && (e.message || e) + '\nv' + kantVersion, { severity: 'warn', timeout: 20 });
}
EDGE_START flow
This flow is used when Manatee needs to start a new instance of the hosted edge browser, Kant. Note that this flow also references the version of the plugin.
var kantBrowser = Module.load('KantBrowser', { version: '0.0.24' });
kantBrowser.launch(Inputs.url, {});