Developer Day

Alfa eCare — Dec 2024

© 2024 Alfa eCare

Plan for today

09:30 Breakfast
10:00 Introduction
10:30 Features and demos, part I
12:00 Lunch
12:45 Features and demos, part II
13:45 Coffee break
14:00 Roadmap and QA
15:15 Conclusions, feedback
15:30 Beers and goodbyes

Slides are available at http://slides.sirenia.io/pregnant-man
Cuesta at https://pregnant-man.sirenia.io and Manatee at https://releases.sirenia.io/test/2.0/pregnant-man/peruser/Setup.exe

© 2024 Alfa eCare

Features and demos

The themes of the features we are talking about today roughly falls into these categories:

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Cuesta makeover

Actionable warnings

Code-completion for options parameters

© 2024 Alfa eCare
Cuesta makeover

New menu

Collapsible sections. Some rearrangement of items.

Download specific version from hub

© 2024 Alfa eCare
Cuesta makeover

Favourites ❤️

Landing page and search.

Subject table when creating state flows

© 2024 Alfa eCare
Cuesta makeover

Regexp visualisation and verification

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Fields

Many new features in field APIs and tooling. Highlights:

  • Field finder evolved
  • Field editing UI for inline/dynamic fields
  • New events API for web
  • Get selected text
  • Masking a field
© 2024 Alfa eCare
Fields

Field finder evolved

Old field finder

  • Produced a single often very long path
  • Often didn’t work (some drivers more than others)
  • Required complex manual work in some cases to make the path work robustly
    • External tools sometimes required (e.g. Inspect.exe, Chrome dev tools, intuition)
  • Unforgiving learning curve for new developers
© 2024 Alfa eCare
Fields / Field finder

New field finder 🎉

  • A set of working paths are automatically produced
  • Evolutionary algorithm produces, combines and evaluates field variations
  • Ranked list of working paths
  • Explanations for the assigned scores (pros and cons)
  • Much easier to use for new developers
© 2024 Alfa eCare
Fields / Field finder

Evolutionary algorithms

Takes inspiration from Darwinian evolution.

© 2024 Alfa eCare
Fields / Field finder

Mutations

A random sequence of the following mutations produce path variations for evaluation

  • Deep match: A/B/C mutates to **/B/C, **/C, A/**/C
  • Token swap: A/B/C mutates to A2/B/C, A/B2/C, A/B/C2, A/B2/C2
  • Positional: A/B/C mutates to **/some-label<left-of>C, **/some-label<above>C
  • Relational: A/B/C mutates to A/B/D<sibling-of>C. **/E<child-of>C

The result is non-deterministic. Run it again!

© 2024 Alfa eCare
Fields / Field finder

Fitness criteria

The machine is opinionated. We have embedded our own experience into the algorithm.

  • Working path: Main criterion. Is the right UI element found.
  • Speed: Prefer faster paths.
  • Brevity: Prefer shorter paths.
  • Modifiers based on labels: These are usually quite robust.
  • Unique tokens: Prefer paths with many unique tokens.
  • Dynamic tokens: Prefer paths with word-like tokens.
  • Too generic: E.g. **/(type)button is less preferred.

And even more. Weights for each can be customized in settings.

© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare
Fields

UI for dynamic fields

Same UI as for stand-alone fields via new inline editor link

© 2024 Alfa eCare
Fields

UI for dynamic fields

© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare
Fields

New events API for web

Advanced api for rare cases. Emits an event from a field. Common use case: Trigger form validation to enable submit button.

Fields.nameInput.input("121212-5CD9");

Fields.nameInput.emit(Events.KEY_PRESS, "Enter");

Fields.okButton.click();

The second line is translated to

element.dispatchEvent(new KeyboardEvent("keypress", { key: "Enter" }));
© 2024 Alfa eCare
Fields / New events API for web

Event types

Predefined e.g. LEFT_MOUSE_DOWN, RIGHT_MOUSE_UP, KEY_DOWN, FOCUS, BLUR, CHANGE.

The emit function also supports further customization for the adventurous user:

// in flow
Fields.nameInput.emit("Event", "custom-event", {
  bubbles: false,
  cancelable: true,
  composed: true,
  customProp: "foobar",
});
// in the browser it is translated to
element.dispatchEvent(
  new Event("custom-event", {
    bubbles: false,
    cancelable: true,
    composed: true,
    customProp: "foobar",
  }),
);
© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare
Fields

Get selected text

The selectedText property has been added to the inspect result for text inputs and textarea elements.

var selectedText = Fields.note.inspect().selectedText;
© 2024 Alfa eCare
Fields

Masking a field

A mask is an “obstruction” that can hide a UI element or part of the screen.

It is not a fool-proof security measure but can be useful to prevent accidental clicks or to hide information that should not be seen by the user.

This works on a Field instance by invoking the mask function. In the simplest case you can supply no arguments:

// Assuming you have a "OkButton" field defined
Fields.OkButton.mask();
© 2024 Alfa eCare
Fields

Masking a field

The mask function can take an object as argument to control the appearance and behavior of the mask. E.g. to control the color of the mask. The following options are available:

  • color The color of the mask.
  • blur Blur instead of color.
  • throttleMs How aggressively to throttle the mask.

The blur: true mode looks like this:

© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Browser driver

Forced rework for Chrome Manifest v3

  • Goodbye Field.eval 🪦
  • Hello to new api features:
    • Field.findAll with querySelector
    • Field.emit
    • Document property access (inspect)
  • Auto-reload of Chrome driver in tabs on update
  • New robustness features deal with hostile apps

Krom/Kant continue to support eval.

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Java driver

Lots of fixes and performance improvements, better serialisation for inspect results and a bridging mechanism that enables embedded technologies to be interacted with. We will go through a few of these changes now:

  • Ban-list for field-finder
  • Bridges for embedded content
  • .selectedText in inspect results
© 2024 Alfa eCare
Java driver

Ban-list for field-finder

We have encountered some applications that put a non-interactive overlay on top of the application. It is for instance used as a drop-target for drag-and-drop operations.

But fool us no more! We have added a ban-list to the field-finder to prevent these elements from being found in the field finder.

© 2024 Alfa eCare
Java driver

JFX and embedded browser bridges

© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Context Management

Automated participants have so far only participated in a simplified version of context synchronization; basically only get and set of variables.

  • Better overview
    New UI for state flows.

  • Awareness of subject removals
    Deleting a subject in a shared context was previously pretty much impossible to detect in an automated participant.

  • Context Changes Pending
    Asking participants whether they are ready for a given change. As opposed to just telling them to change.

© 2024 Alfa eCare
Context Management

New UI elements

Better overview

  • Subject input is now a type-ahead which makes it easier to find an already existing subject. 1
  • Overview of where the subject is already used. 3

Subject removals

  • Run set state flow with null when subject is removed. 2
© 2024 Alfa eCare
Context Management

Pending Changes

© 2024 Alfa eCare
Context Management

Pending Changes

  • New Can set? state flow type that asks the participant whether it is ready to set a subject.
  • Flow can set a RejectReason to explain why it can’t set the subject.
  • You can include a resolution object which is used in determining the actions to initiate.

Simple rejection:

RejectReason = "I'm busy";
© 2024 Alfa eCare
Context Management

Pending Changes

With a resolution:

RejectReason = { reason: "I'm busy", resolution: { type: "suspendMe" } };

You can choose between the following resolutions:

  • "suspendMe" Suspend the participant temporarily. Can be combined with autoResumeOnNextTx and autoResumeAfterSeconds.
  • "exitMe" Exit this participant.
  • "exitChangee" Exit the participant that initiated the change.
  • "rollback" Try to rollback the change.
© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Unattended Automation

Historically we’ve focused on attended automation i.e. running flows initiated by the user and in which the user is often participant in the automation.

Unattended automation is another beast where you run flows triggered by external events and do not require input from a user.

Two new features in this area:

  • Secrets
  • Remote desktop access
© 2024 Alfa eCare
Unattended Automation

Secrets

The Secrets feature is a secure way to store and retrieve secrets. There are four different types of encryption methods depending on how and where the secret is supposed to be used.

  • Global. All Manatee instances can decrypt the secret.
  • Machine. Manatee instances on the specified machine can decrypt the secret.
  • User. Only the specific user can decrypt it.
  • Password. You need to know the password to decrypt it.
© 2024 Alfa eCare
Unattended Automation

Secrets

Valid date can be set to match e.g. password expiration.

Secrets can be restricted to certain groups and flows to prevent leaks.

Usage reporting.

© 2024 Alfa eCare
Unattended Automation

Secrets

The Secrets module can be used to programmatically interact with and use stored secrets.

// Retrieve and decrypt a secret
var revealed = Secrets.reveal("MySecret");

// No one else may know this
Secrets.forget("MySecret");

// Store another secret
Secrets.keep("Another", { Password: "f00b4r" }, { type: Secrets.User });

If you publish a flow with secrets, automatic extensions are created s.t. a consumer of the flow can provide their own secrets.

© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare
Unattended Automation

Remote Desktops

In order to run Manatee and interact with applications you need a desktop session on a machine. Pistia is a tool to connect to one or more desktops and keep login sessions alive.

The configuration is done in the Cuesta in the desktops page.

© 2024 Alfa eCare
© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Tables

We have done a few table related updates in this release.

  • Parsing tabular data from non-standard tables, i.e. getting structured data from things that only look like tables.
    Use this in cases where you get unexpected information back from .inspect().
  • Using aria information to identify tables.
    Aria is a way to add information to web pages to make them more accessible. We can now use this information to identify tables.
  • Table.update can now add new rows.
    The update function is a way to update many rows at once, but it can now also add new rows. You do this by returning an array of objects with the new rows.
© 2024 Alfa eCare
Tables

Not a table at all

<div class="table">
  <div class="header">
    <div>Name</div>
    <div>Address</div>
  </div>
  <div>
    <div>John Smith</div>
    <div>123 Oak St, Portland, OR</div>
  </div>
  ...
</div>

But it may look like a table to an unsuspecting human.

© 2024 Alfa eCare
Tables

Aria style table

<div role="table" aria-label="Patient Information List" class="table">
  <div role="rowgroup">
    <div role="row" class="header">
      <div role="columnheader" aria-sort="none">Name</div>
      <div role="columnheader" aria-sort="none">Address</div>
    </div>
  </div>
  <div role="rowgroup">
    <div role="row">
      <div role="cell">John Smith</div>
      <div role="cell">123 Oak St, Portland, OR</div>
    </div>
  </div>
  ...
</div>
© 2024 Alfa eCare

DEMO

© 2024 Alfa eCare
Tables

Table.update can add rows

Insert new rows by returning an array of the new rows.

Table.update("ages", function (row, index) {
  if (row[0] == "Bill") return [["Alice", 25], row, ["Bob", 30]];
  return row;
});

This will insert two new rows before and after the “Bill” row.

The return value from .update(...) can be a list of rows that should replace the row in question.

© 2024 Alfa eCare

Features and demos

  • Cuesta makeover
  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • New modules
  • Breaking changes
© 2024 Alfa eCare

New modules

Network

  • Pings
  • DNS lookups
  • Wake-on-LAN
  • ARP
  • IP config
  • Trace route
  • Netstat
© 2024 Alfa eCare
New modules

Compress

Zip and unzip files.

Screens

Detect physical screens and their properties.

Image

Crop, color detection.

© 2024 Alfa eCare
New modules

Word

Parsing and basic editing of Word documents.

OpenAI

Interaction with OpenAI LLM models.

© 2024 Alfa eCare

Features and demos

  • Fields
  • Browser driver
  • Java driver
  • Context Management
  • Unattended automation
  • Tables
  • Cuesta makeover
  • New modules
  • Breaking changes
© 2024 Alfa eCare

Breaking in 2.0

Changes that may require configuration changes or updates to existing flows and apps.

  • .NET from 4.5.2 to 4.7.2
  • New native driver technology
  • Browser driver 2.0 (minor breakage)
    • inspect output no longer contains script/css elements (data size)
    • StellerLegacyIgnoredElementBehavior
    • Chrome driver gets injected lazily (smaller overall footprint)
    • StellerLegacyInjectionBehavior
© 2024 Alfa eCare
Breaking

New native driver

Technology upgrade

  • The previous tech is no longer maintained
  • Certain apps were beyond our capabilities (WebReq)
  • New and old drivers both available as plugins
© 2024 Alfa eCare
Breaking / New native driver

Inspect output differences

// v1.29
{
  "legacyValue": "Select Patient",
  "showing": true,
  "hasfocus": false,
  "className": "ui dropdown",
  "controlType": "ControlType.ComboBox",
  "value": "Select Patient"
}
// v2.0
{
  "legacyValue": "Select Patient",
  "showing": true,
  "hasfocus": false,
  "className": "ui dropdown",
  "controlType": "ComboBox",
  "value": "Select Patient",
  "text": "Select Patient",
  "enabled": true,
  "behaviors": [
    "ExpandCollapse",
    "LegacyIAccessible",
    "ScrollItem",
    "TextChild",
    "Value"
  ]
}
© 2024 Alfa eCare
Breaking / New native driver

Approaches to migration

For new apps you should simply use the new driver. For existing apps you have a few options:

  1. Optimistic: Run existing apps on the new driver by default
  2. Conservative: Run existing apps on the old driver by default
© 2024 Alfa eCare
Breaking / New native driver

Optimistic migration

Uses the new driver by default

  1. Install the new Manatee 2.0 in test/dev environment
  2. Set the LegacyNativeApplicationsAreHandledByFlaUI Manatee setting to true.
  3. Test your apps (will use the new driver).
  4. If a flow doesn’t work, either
    1. Revert app type to the old driver (plugin), or
    2. Fix the issues, so the flow works on the new driver
  5. When all apps work, apply to production
© 2024 Alfa eCare
Breaking / New native driver

Conservative migration

Uses the old driver by default

  1. Roll out LegacyNativeDriver plugin msi alongside new Manatee 2.0
  2. Load plugin automatically eg with global PreloadedPlugins=LegacyNativePlugin v1.2.3 setting
  3. The old native driver will now continue to be available
© 2024 Alfa eCare

Roadmap

2.1

Feature Status
App finder Done
Better global search Done
Licensing Done
Session indicators on browser tabs Done
Dynamic app borrowing/api revamp Done
BYOE In progress
© 2024 Alfa eCare

Roadmap

2.2

Feature Status
Task queue and other RPA relateds Not begun
Hub 2.0 (plugins) Uncertain
Issues, tests (development flow) Uncertain
LLM integration (what? how? where?) Uncertain
© 2024 Alfa eCare

Questions and answers

You can find the full changelogs at:

Pistia documentation is available at https://docs.sirenia.io/guides/pistia.

© 2024 Alfa eCare

© 2024 Alfa eCare

actionable warnings: not allowed to edit, not maintainer, outdated, downloaded, compatibility update?

Optimal antenna design for NASA's ST5 spacecraft, evolved by an evolutionary algorithm.

Tricky fields: 1.29: fails when there are dynamic ids, fails when fields are shuffled after the fact. 2.0 survives the modifications

Demo: ButtonDemo and Mask flow

Document property inspect: new Field('body').inspect({ includeChildren: false }).$documentURI

Robustness against overridden Event constructors and tighter Content Security Policy

Demo: Show the ban-list and new bridges in the JavaFX application in v1.29 and v2.0

Demo: * First show the UI. * Show the removal of a subject. 1. Start DotNetCP and Patient History. 2. Try to remove the patient in DotNetCP. Use `---8<---` as value. => Nothing happens. 3. Show with "Run on delete" enabled. => Should close the window, show an error. * Show pending using Patient History and Patient Address. 1. Switching to a patient that is not in the address book should trigger a suspension. 2. The other way round is not so nice.

Demo: Show the secret UI. Talk about user and machine encryption. Show a reveal. Groups may fail.

Demo: Use table demo app to show parsing of non-standard tables.