Selenium.WebDriver.SelfHealing is the first to bring Selenium self-healing capabilities natively to the .Net Platform. Selenium.WebDriver.SelfHealing uplifts the native Selenium and makes it particularly suitable for the hardest to automate slow dynamic applications like Pega / Salesforce. Tried and tested in the toughest environments, it will bring stability to your Flaky Tests or rapidly changing UI. Innovative self-healing algorithm, mixed with auto-wait and selector optimization will allow you to deliver your next project on time. Getting started is easy, Selenium.WebDriver.SelfHealing does not require external network access and no servers need to be hosted. Selenium.WebDriver.SelfHealing is an addon to Selenium.WebDriver platform for Web Testing and Automation. Selenium.WebDriver.SelfHealing is built to enable cross-browser web automation that is ever-green, capable, reliable and suitable for the modern dynamic web. - Self-healing, Selenium.WebDriver.SelfHealing will repair broken selectors on the fly. Saving you time and money. Elements attributes can change or it's position within the DOM and element can still be found. Test execution continues like normal. On completion a healing report will be generated. - Auto-wait, Selenium.WebDriver.SelfHealing waits for elements to be actionable prior to performing actions. Auto-wait will search for interactable in preference. The combination of the Auto-wait and Self-healing eliminate the need for artificial timeouts - primary cause of flaky tests. - Selector-optimization, While your scripts are running, we analyse the chosen selector and provide optimization suggestions. Our engine then is able to use these as fallback values. Selenium.WebDriver.SelfHealing (GitHub) - https://github.com/DeliveryAssured/Selenium.WebDriver.SelfHealing Sample Report - https://htmlpreview.github.io/?https://raw.githubusercontent.com/DeliveryAssured/Selenium.WebDriver.SelfHealing/master/sample-healing-report/index.html


Keywords
Selenium, Selenium.WebDriver, WebDriver, self-healing, auto-wait, auto-validate, selector-optimization, CSS, XPath, Automation, Web
License
GPL-3.0
Install
Install-Package Selenium.WebDriver.SelfHealing -Version 0.99.4-beta.1+2

Documentation

Selenium.SelfHealing

Selenium Self-Healing is a revolutionary technology and is set to become the industry standard for rock solid browser automation.

A must have technology for any organisation with a heavy investment in Selenium Automation.

Selenium Self-Healing is a technology suite working together heal your broken selectors, stabilize your Selenium Automation and deliver time-saving Insights.

Selenium Self-Healing will uplift your platform and deliver solid results you can count on.

Live self-healing report


Problem Domain

Selenium Automation Stability

After years of experience delivering large automation suites the stability of the scripts and the reliably of the scripts was always an issue. The types of issues we would see were

  • StaleElementException
  • ElementNotFoundException
  • WebDriverTimeoutException

Broken Selenium Script

Repeatedly we saw Selenium scripts written today only to be failing tomorrow. The developers push some new code or the system got an upgrade and everything would fail.

Hard to get consistent results

The classic problem, 'Works on my machine'

Raising Technical Debt

Technical debt across a platform was ever increasing and there was never enough time allocated to maintenance.

Delivered code was ugly

In order to handle all the errors thrown by the Selenium WebDriver the code was littered with

Try.... Catch...

Thread.Sleep

new WebDriverWait(theDriver).Until(ExpectedCondition.....).

> There had to be a better way and that was our focus


What is it?

Selenium is a technology suite implemented at the WebDriver level. A single line of code is all that is required to get started.

The technology suite covers the following areas.

Self-Healing Engine

Self-Healing is the ability to repair broken selectors at run-time. It does not matter if the the elements attributes have changed or has moved to a new position in the UI.

AutoWait Engine

Selenium was originally developed in 2004 when the web was relatively static. Modern web sites are high dynamic, elements are constantly changing and reacting to user input.

Without a modernizing library like Selenium Self-Healing the types of issues you would run into are

  • WebElementException
  • ElementNoFoundException
  • WebElementTimeoutException
  • StaleReferenceException.

If your frustrated by this, so to were we.

AutoWait feature is similar to that of Playwrite's AutoWait. Essentially web pages can be slow load and if the element is not found then a process of retry operations will kick in.

Overall as the developer, instantly you will see more stable Selenium sessions and better test execution results in your CICD pipeline.

Selector Optimization Engine

The Selector Optimization Engine is responsible for reviewing selectors at run-time and making optimization suggestions.

These alternate selectors are guaranteed to uniquely find the same element you intended. They are surfaced through development logs and ultimately feed back into the Self-Healing Engine.

Self-Healing Insights Report

The Self-Healing Insights report is a real time save when reviewing Test Execution Sessions and diagnosing issue.

The report easily integrates into your CICD processes and will save you time.

Package Selection

Our technology operates at the WebDriver level and we have a NuGet package to suite your requirements.

Before installing this package you need to identify the version of Selenium.Support your are using. We have 3 technology solutions to target any major Selenium version and platform compatibility from .Net Framework 4.0 - .Net6.

There are packages available to support

Selenium.SelfHealing.v2

Selenium.SelfHealing.v3

Selenium.SelfHealing.v4

Selenium.WebDriver.SelfHealing

  • Deprecated package that targeted Selenium.SelfHealing.v4.
  • Slitting the package enabled us to expand support to all major versions Selenium and the whole .Net Platform.

Installation


Selenium.SelfHealing is distributed as a NuGet package.

Pre-installation

Please ensure you have carefully reviewed the version of Selenium.Support you are using and choose the package to suite.

New projects will probably default to Selenium.SelfHealing.v4.

It is also good practice to ensure the following 2 NuGet packages are in sync.

  • Selenium.Support
  • Selenium.WebDriver

Using command-line

The easiest way to get started is to run the following command.

dotnet add package Selenium.SelfHealing.v4

Using Package Manager

Install-Package Selenium.SelfHealing.v4

Getting Started


Once installed into the project getting started is just one line of code.

using Selenium.SelfHealing;

var options = new ChromeOptions();
var chromeDriver = new ChromeDriver(options);

// this creates a self-healing WebDriver
var selfHealingDriver = chromeDriver.ToSelfHealingDriver();

Capabilities


Resilient • Reduce flaky tests

Self-healing. Selenium.SelfHealing will repair broken selectors on the fly. Saving you time and money. Elements can change attributes or position and still be self-healed.

Auto-wait. Selenium.SelfHealing waits for elements to be actionable prior to performing actions. Auto-wait will search for interactable elements in preference. The combination of the Auto-wait and Self-healing eliminate the need for artificial timeouts - primary cause of flaky tests.

Selector-optimization. While your scripts are running, we analyse the chosen selector and provide optimization suggestions.

No trade-offs • No limits

Parallel test execution. Run tests in parallel and save time. Our framework was build to handle everything.

Selenium-insights. While Selenium.SelfHealing is active all activity is logged for review.

Self-Healing Insights Report

Healing-report. A detailed report is created after every session, detailing any broken selectors and the actions required to fix.

TeamCity integration. Easily integrate your self-healing report into a build tab.

Emailable HTML Report. Reports are viewable directly from the file system and can easily be emailed and shared.

Sample Report

Selenium.SelfHealing Report

Sample Logs

Selenium.SelfHealing Report