EPAM Healenium is a testing framework extension that improves stability of Selenium-based test cases, handling changes of updated web elements.

Self-healing capabilities allows to replace "broken" locator with a new value and fix test in runtime.
It is open-sourced and available in GitHub.

It can be used with:
  • FindElement method
  • FindElements method; also using under parent element parent.findElements()
  • @FindBy and PageFactory
  • CssSelector
  • Using semantic locators like Id, Name, ClassName, LinkText, PartialLinkText, TagName
  • Inside conditional wait
  • Selenium 4
Quick start
This section describes the steps to integrate Healenium with your project. It can be integrated with different platforms. In this section there will be consider how to setup Healenium with Java, Cucumber, C#, Python and JavaScript.

Note: healing for changed locators will appear only if at least once this locator has been found on page and it was correct.
Option 1: you have Docker

You can try to start with healenium java example from GitHub.

Installation for Java-based project using Docker.

1. Make sure you have the recent Docker version installed.
2. Add Healenium dependency into project



dependencies {
compile group: 'com.epam.healenium', name: 'healenium-web', version: '3.4.2'
3. Create healenium.properties file in resources folder in your project
Fill it with the following properties:

recovery-tries = 1
score-cap = 0.6
heal-enabled = true
hlm.server.url = http://localhost:7878
hlm.imitator.url = http://localhost:8000
4. Add Healenium-backend settings
Download Example of compose descriptor into your test project

$ curl https://raw.githubusercontent.com/healenium/healenium-client/master/example/docker-compose.yaml
Create /db/sql folder on the same level in your project. Add init.sql file into ./db/sql/init.sql folder in your project

curl https://raw.githubusercontent.com/healenium/healenium-client/master/example/init.sql
5. Delegate SelfHealingDriver
Change your driver delegating it to SelfHealingDriver as in example:
WebDriver delegate = new ChromeDriver(options); driver = SelfHealingDriver.create(delegate);
6. Run tests
Run your tests using JUnit, TestNG or Maven command.
Check logs after running to see which locators were changed and healed. To run tests via Maven you can use command mvn clean test

For more information, please see Setup Integration with Java video.
Results report

Navigate to http://<hlm-backend>/healenium/report/ to take a look at the report. In case setup healenium services locally path to report: http://localhost:7878/healenium/report
Note: ReportPlugin for maven or gradle project is outdated and no longer supported by the team.
There is no need to use Maven or Gradle plugin. Report is generated for every Selenium session. This applies to both healenium-web and healenium-proxy.
What report contains
By going to the generated link will be provided generated report with the next items:
  • path to healed locator
  • failed locator value
  • healed locator value
  • screenshot of healed locator on page
  • correct or not correct healing slide
  • score

        Notes: Report will be empty if no healing has been provided.
        Disabled healing
        For some tests according to business logic it can be not necessary to use self-healing. And for such cases you can disable healing for particular selector. Navigate to http://<hlm-backend>/healenium/selectors . In case setup healenium services locally path to stored selectors: http://localhost:7878/healenium/selectors

        Selector page contains:
        • Selector
        • Type (single/multiple)
        • URL where it's used
        • Toggle to enable/disable healing

        Selector types: single and multiple correspond to findElement and findElements methods. By default multiple type is disabled for healing. Use toggle to make selector enable for healing.
        Option 2: no Docker
        Download Healenium project or clone using command:
            git clone https://github.com/healenium/healenium.git
            1. Start PostgeSql server.
            • Create user (healenium_user/YDk2nmNs4s9aCP6K)
            • Set attribute 'Can Login' (true) to user
            • Create database (healenium) and set owner healenium_user
            • Create schema (healenium) and set owner healenium_user
            2. Go to /shell-installatio/web and specify your db user and password data in the bash script 'start_healenium.sh'
            3. Setup selenium server (selenium-grid)
            4. Run bash script 'download_services.sh' to download healenium services:
              5. Launch healenium components:
                Note: database, schema, user and password can be overridden. Such names have been chosen as an example.
                Healenium-Proxy is a cross-platform framework realizing self-healing test automation. It has the same functionality as during using Maven dependency.
                Note: Healenium-Proxy can be used with Java-based projects as well.
                Documentation about Healenium-Proxy you can find here: Healenium-Proxy docs
                IntelliJ IDEA

                Plugin ID
                : com.epam.healenium.hlm-idea

                To perform updates in code just click with right button on failed locator and select Healing results action. After this select new locator with highest score in dropdown list.
                Last version (1.0.5) released on 25.01.2021
                Install it automatically from IntelliJ Idea plugin repository.
                Tested and supports IntelliJ versions: 2020.1

                Plugin Installation
                1. Using IDE built-in plugin system on Windows:
                  File > Settings > Plugins > Browse repositories... > Search for "Locator Updater" > Install Plugin
                2. Using IDE built-in plugin system on MacOs:
                  Preferences > Settings > Plugins > Browse repositories... > Search for "Locator Updater" > Install Plugin
                3. Restart IDE.
                Version compatibility

                Here you can find the latest healenium-web, healenium-back and healenium-proxy versions and their compatibility. If you are not sure with versions you should use, just use components from this table.
                Healenium-Web + Healenium-Back for Java based projects
                hlm-back 3.1.4
                hlm-back 3.1.5
                hlm-back 3.2.0
                hlm-back 3.2.1
                hlm-web 3.2.4
                hlm-web 3.2.3
                hlm-web 3.2.2
                hlm-web 3.2.1
                hlm-web 3.2.0
                hlm-web 3.1.7
                hlm-web 3.1.6
                Healenium-Back + Healenium-Proxy for .NET, Python, JavaScript based projects
                hlm-back 3.1.4
                hlm-back 3.1.5
                hlm-back 3.2.0
                hlm-back 3.2.1
                proxy 0.2.4
                hlm-web 3.2.4
                hlm appium 1.2.4
                proxy 0.2.3
                hlm-web 3.2.3
                hlm appium 1.2.3
                proxy 0.2.1
                hlm-web 3.2.1
                proxy 0.2.0
                hlm-web 3.1.6
                proxy 0.1.0
                hlm-web 3.1.6
                Get started with Healenium, it's open-sourced and free
                In case you want to learn more about Healenium,
                our team will help you with any questions or requests.
                About Healenium
                • Anna_Chernyshova@epam.com - Project Manager
                • Dmitriy_Gumeniuk@epam.com - Project Supervisor