Skip to content

healenium/healenium-example-javascript

Repository files navigation

JavaScript Example with Healenium

Docker Pulls License

This repository contains automation tests on JavaScript using Healenium.

1. Start Healenium components

2. Configuration RemoteWebDriver for Healenium

3. Run tests using Jasmine

4. Monitoring tests running

How to start

1. Start Healenium components

Go into healenium folder

cd healenium

Run Healenium with Selenium-Grid:

docker-compose up -d

Run Healenium with Selenoid:

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

ATTENTION

Verify the next images are Up and Running

  • 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)

2. Configuration RemoteWebDriver for Healenium

To run using Healenium create RemoteWebDriver with URL http://<remote webdriver host>:8085:

    driver = await new webdriver.Builder()
        .withCapabilities(webdriver.Capabilities.chrome())
        .usingServer('http://localhost:8085')
        .build();

To temporarily disable the healing mechanism for certain sections of your code, use the following syntax:

    await this.driver.executeScript("disable_healing_true");
    ... // Your code that does not require healing
    await this.driver.executeScript("disable_healing_false");

3. Run tests using Jasmine

Add Jasmine to your package.json

npm install --save-dev jasmine

Initialize Jasmine in your project

npx jasmine init

Set jasmine as your test script in your package.json

"scripts": { "test": "jasmine" }

Run your tests

npm test

4. Monitoring tests running

You can monitor tests running if you using Healenium with Selenoid plus Selenoid Ui, go to :

http://localhost:8080

Community / Support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •