Healenium-Web without Docker
Requirements:

  • Java 8+
  • Python
  • PostgerSQL
Install PostgreSQL: https://www.postgresql.org/download/

After successful installation, you need to prepare the database for Healenium services using psql:

1.1. Create database and user
    
    CREATE DATABASE healenium;
    CREATE USER healenium_user WITH ENCRYPTED PASSWORD 'YDk2nmNs4s9aCP6K';
    GRANT ALL PRIVILEGES ON DATABASE healenium TO healenium_user;
    ALTER USER healenium_user WITH SUPERUSER;
    \c healenium healenium_user;
    
    1.2. Create schema
      
      CREATE SCHEMA healenium AUTHORIZATION healenium_user;
      GRANT USAGE ON SCHEMA healenium TO healenium_user;
      
      Install Healenium without Docker

      1. Download latest version or clone Healenium repository:
      Structure of archive:

      • /shell-installation/ - directory for install Healenium without docker. It contains /selenium-grid (for Healenium-Proxy) and /web (for Healenium-Web) directories

      2. Go to /shell-installation/web

      3. Download Healenium components. Run download_services.sh

      4. Run start_healenium.sh

      Navigate to http://<hlm-backend-address>/healenium/report to check healenium backend is running.
      Locally: http://localhost:7878/healenium/report
      5. Add Project dependancy
      
      <dependency>
          <groupId>com.epam.healenium</groupId>
          <artifactId>healenium-web</artifactId>
          <version>3.5.1</version>
      </dependency>
      
      
      implementation 'com.epam.healenium:healenium-web:3.5.1'
      
      4. Init driver instance of SelfHealingDriver
      
      //declare delegate
      WebDriver delegate = new ChromeDriver();
      //create Self-healing driver
      SelfHealingDriver driver = SelfHealingDriver.create(delegate);
      
      4.1 Init wait driver instance of SelfHealingDriverWait. Healenium support Explicity wait from 3.4.4+ version. In this case, healing will happen after a 10-second wait.
      
      //declare delegate
      WebDriver delegate = new ChromeDriver();
      //create Self-healing driver
      SelfHealingDriver driver = SelfHealingDriver.create(delegate);
      
      WebElement element = new SelfHealingDriverWait(driver, Duration.ofSeconds(10))
                      .until(ExpectedConditions.visibilityOfElementLocated(By.id("wait_new_element")));
      
      5. Create healenium.properties file in resources folder in your project and fill it with the following properties:
      
      recovery-tries = 1
      score-cap = .6
      heal-enabled = true
      hlm.server.url = http://localhost:7878
      hlm.imitator.url = http://localhost:8000
      
      Logging
      By default Healenium logging info level. Add simplelogger.properties file in resources folder in your project to retrieve all logs:
      
      org.slf4j.simpleLogger.log.healenium=debug
      
      Configuration
      Attribures of healenium.properties file:
      Evirovemend variables of Healenium-backend (start_healenium.sh):

      About Healenium
      Contacts
      • Anna_Chernyshova@epam.com - Project Manager
      • Dmitriy_Gumeniuk@epam.com - Project Supervisor