Skip to content

DzmitryHumianiuk/healenium

 
 

Repository files navigation

Healenium

Docker Pulls License @healenium

Table of Contents

Overall information

Healenium installation

Healenium installation without Docker

Language Examples

Overall information

Self-healing framework based on Selenium and able to use all Selenium supported languages like Java/Python/JS/C# Healenium acts as proxy between client and selenium server.

Docker-compose includes the following services:

  • postgres-db (PostgreSQL database to store etalon selector / healing / report)
  • hlm-proxy (Proxy client request to Selenium server)
  • hlm-backend (CRUD service)
  • selector imitator (Convert healed locator to convenient format)
  • selenoid/selenium-grid (Selenium server)

Healenium installation

Clone Healenium repository:

git clone https://github.com/healenium/healenium.git

Run Healenium with Selenoid

Note: browsers.json consists of target browsers and appropriate versions. Before run healenium you have to manually pull selenoid browser docker images with version specified in browsers.json

Example pull selenoid chrome image:

docker pull selenoid/vnc:chrome_102.0

Full list of browser images you can find here

Run healenium with Selenoid:

docker-compose up -d

Run Healenium with Selenium-Grid:

docker-compose -f docker-compose-selenium-grid.yaml up -d

Run Healenium with Appium only

docker-compose -f docker-compose-appium.yaml up -d

More details about integration Healenium with Appium here

Healenium installation without Docker

Go to shell-installation:

cd shell-installatio

There are locally and remote options to run healenium.

  1. Start PostgeSql server.
  • Create user (healenium_user/YDk2nmNs4s9aCP6K) (example data)
  • Set attribute 'Can Login' (true) to user
  • Create database (healenium) and set owner healenium_user
  • Create schema (healenium) and set owner healenium_user
  1. Specify your db user and password data in the bash script 'start_healenium.sh'.

  2. Setup selenium server (selenium-grid)

Download healenium services

download_services.sh

Run shell command to launch healenium components

start_healenium.sh

Language examples

    /**
    * "http://127.0.0.1:8085" OR "http://localhost:8085" if you are using locally running proxy server
    *
    * if you want to use a remote proxy server,
    * specify the ip address of this server - "http://remote_ip_address:8085"
    */
Java:
    String nodeURL = "http://localhost:8085";

    ChromeOptions options = new ChromeOptions();
    options.addArguments("--no-sandbox");
    options.addArguments("--disable-dev-shm-usage");

    WebDriver driver = new RemoteWebDriver(new URL(nodeURL), options);
Python
    nodeURL = "http://localhost:8085"
    
    options = webdriver.ChromeOptions()
    options.add_argument('--no-sandbox')
    
    current_webdriver = webdriver.Remote(
        command_executor=nodeURL,
        desired_capabilities=webdriver.DesiredCapabilities.CHROME,
        options=options,
    )
C#
    String nodeURL = "http://localhost:8085";

    ChromeOptions optionsChrome = new ChromeOptions();
    optionsChrome.AddArguments("--no-sandbox");
    
    RemoteWebDriver driverChrome = new RemoteWebDriver(new Uri(nodeURL), optionsChrome);
JavaScript
    const NODE_URL = "http://localhost:8085";

    let args = [
        "--no-sandbox"
    ];

    let chromeCapabilities = selenium.Capabilities.chrome()
        .set('chromeOptions', { args });

    let builder = new selenium.Builder()
        .forBrowser('chrome')
        .withCapabilities(chromeCapabilities);

    let driver = await builder.usingServer(NODE_URL).build();

Community / Support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%