Heleanium - Web without using Docker
Heleanium - Web without using Docker
Official Heleanium Website: https://healenium.io/docs/overview
Youtube Video Link : https://www.youtube.com/watch?v=EF2gM16TnJg
1. We need install first :
Java 11+ , Python ( 3.12.0 )& PostgreSQL ( prefer to use latest 16 version )
2. Once PostgersSQL installed ( make sure during installation whatever you put the password for the same you remember / noted down, need this is in 3rd step), open SQL Shell ( psql ) from the applications, as shown below:
3. Once you open the Shell , hit ENTER till Username & provide same Password as in the step 2.
4. Now , feed one by one on the above terminal, this will create the DB , User & Schema for you:
4.1 : CREATE DATABASE healenium;
4.2 : CREATE USER healenium_user WITH ENCRYPTED PASSWORD 'YDk2nmNs4s9aCP6K';
4.3 : GRANT ALL PRIVILEGES ON DATABASE healenium TO healenium_user;
4.4 : ALTER USER healenium_user WITH SUPERUSER;
4.5 : \c healenium healenium_user;
4.6 : CREATE SCHEMA healenium AUTHORIZATION healenium_user;
4.7 : GRANT USAGE ON SCHEMA healenium TO healenium_user;
and keep hit the ENTER after Each line you will get the O/p like below:
5. Now install Heleanium-Web :
From the official document page by hitting download link
https://healenium.io/docs/download_and_install/hlm_web
or use direct link :
https://github.com/healenium/healenium/releases/download/1.4.0/healenium-1.4.0.zip
6. Now Go to directory /shell-installation/web, where the above Heleanium zip extracted.
6. 1 Download Healenium components. Run download_services.sh
If you are using Windows use cmd and use : run download_services.sh
or direct hit on the download_services.sh file.
And on MacOX use new Terminal navigate to the respective directory &
type : chmod +x <and compete shell-installation/web PWD )
on the next line type : sh download_services.sh
6.2 Run start_healenium.sh
use the above Windows suggestion for Win
and on Mac use sh start_healenium.sh
7. Now check are you able to see healenium report or not at local host : 7878
4. Now , feed one by one on the above terminal, this will create the DB , User & Schema for you:
4.1 : CREATE DATABASE healenium; 4.2 : CREATE USER healenium_user WITH ENCRYPTED PASSWORD 'YDk2nmNs4s9aCP6K'; 4.3 : GRANT ALL PRIVILEGES ON DATABASE healenium TO healenium_user; 4.4 : ALTER USER healenium_user WITH SUPERUSER; 4.5 : \c healenium healenium_user; 4.6 : CREATE SCHEMA healenium AUTHORIZATION healenium_user; 4.7 : GRANT USAGE ON SCHEMA healenium TO healenium_user; and keep hit the ENTER after Each line you will get the O/p like below:
5. Now install Heleanium-Web : From the official document page by hitting download link https://healenium.io/docs/download_and_install/hlm_web or use direct link : https://github.com/healenium/healenium/releases/download/1.4.0/healenium-1.4.0.zip
4.1 : CREATE DATABASE healenium; 4.2 : CREATE USER healenium_user WITH ENCRYPTED PASSWORD 'YDk2nmNs4s9aCP6K'; 4.3 : GRANT ALL PRIVILEGES ON DATABASE healenium TO healenium_user; 4.4 : ALTER USER healenium_user WITH SUPERUSER; 4.5 : \c healenium healenium_user; 4.6 : CREATE SCHEMA healenium AUTHORIZATION healenium_user; 4.7 : GRANT USAGE ON SCHEMA healenium TO healenium_user; and keep hit the ENTER after Each line you will get the O/p like below:
5. Now install Heleanium-Web : From the official document page by hitting download link https://healenium.io/docs/download_and_install/hlm_web or use direct link : https://github.com/healenium/healenium/releases/download/1.4.0/healenium-1.4.0.zip
8. Now lets create a Maven Project use the latest Healenium-Web dependencies and use the below syntax to trigger the script.
You can refer my youtube demo for same for any clarification enjoy, happy learning
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<selenium.version>4.18.1</selenium.version>
<healenium.version>3.4.8</healenium.version>
</properties>
<dependencies>
<dependency>
<groupId>com.epam.healenium</groupId>
<artifactId>healenium-web</artifactId>
<version>${healenium.version}</version>
</dependency>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<selenium.version>4.18.1</selenium.version>
<healenium.version>3.4.8</healenium.version>
</properties>
<dependencies>
<dependency>
<groupId>com.epam.healenium</groupId>
<artifactId>healenium-web</artifactId>
<version>${healenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
</dependencies>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
</dependencies>
import com.epam.healenium.SelfHealingDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class HeleaniumTest {
public static void main(String[] args) {
WebDriver delegate = new ChromeDriver();
//create Self-healing driver
SelfHealingDriver driver = SelfHealingDriver.create(delegate);
driver.get("https://www.google.com");
driver.findElement(By.xpath("//a[text()='About']")).click();
}
}
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class HeleaniumTest {
public static void main(String[] args) {
WebDriver delegate = new ChromeDriver();
//create Self-healing driver
SelfHealingDriver driver = SelfHealingDriver.create(delegate);
driver.get("https://www.google.com");
driver.findElement(By.xpath("//a[text()='About']")).click();
}
}
You can refer my youtube demo for same for any clarification enjoy, happy learning
Facing below issue when I try to run my code
ReplyDeleteException in thread "main" java.lang.NoSuchMethodError: 'java.util.function.Supplier org.openqa.selenium.remote.http.HttpResponse.getContent()'
at com.epam.healenium.client.RestClient.getElements(RestClient.java:141)
at com.epam.healenium.SelfHealingEngine.loadStoredSelectors(SelfHealingEngine.java:169)
at com.epam.healenium.SelfHealingDriver.callInitActions(SelfHealingDriver.java:65)
at com.epam.healenium.SelfHealingDriver.create(SelfHealingDriver.java:42)
at Test.main(Test.java:9)
Process finished with exit code 1
and in RestClient.Java log is not declared (line 82) and line 92 to be surrounded with Try and catch