Skip to content

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:

  1. Identify set of groups for machines that should have the plugin (GROUPS)
  2. Identify headless app (HEADLESS_APP) that can be used for starting the plugin and the browser
  3. Create headless flow (PLUGIN_START) for starting the plugin
  4. Set GROUPS on HEADLESS_APP and PLUGIN_START
  5. Register hosted edge plugin app type in cuesta via a manatee with the running plugin (if the app type isn’t already made available)
  6. Create headless flow (EDGE_START) in HEADLESS_APP for launching the browser (and reload Cuesta)
  7. Add url input parameter to EDGE_START flow
  8. Set up a Manatee Boot trigger on PLUGIN_START
  9. Create plugin-edge-app (PLUGIN_EDGE_APP)
  10. Set GROUPS on PLUGIN_EDGE_APP
  11. Set Launch With to something like `manatee:runflow/withname/PLUGIN_START?url=https:%3A%2F%2Fdr.dk
  12. Set Executable-path contains to Kant.exe
  13. 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.

javascript
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.

javascript
var kantBrowser = Module.load('KantBrowser', { version: '0.0.24' });

kantBrowser.launch(Inputs.url, {});