diff --git a/pom.xml b/pom.xml
index 753b259..6897fc3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
4.0.0
com.epam.healenium
healenium-web
- 3.4.4
+ 3.4.6
jar
healenium-web
healenium web client
@@ -52,7 +52,7 @@
3.8.4
1.4.2
0.4.12
- 4.10.0
+ 4.13.0
2.15.2
3.12.0
1.15
@@ -66,7 +66,7 @@
6.1.1
1.16.3
5.8.2
- 5.1.0
+ 5.5.3
diff --git a/src/main/java/com/epam/healenium/SelfHealingEngine.java b/src/main/java/com/epam/healenium/SelfHealingEngine.java
index 1cbc332..30500c5 100644
--- a/src/main/java/com/epam/healenium/SelfHealingEngine.java
+++ b/src/main/java/com/epam/healenium/SelfHealingEngine.java
@@ -180,7 +180,8 @@ public void loadStoredSelectors() {
.setEnableHealingElements(enableHealingElementsDto.stream()
.collect(Collectors.toMap(SelectorDto::getId, SelectorDto::getLocator)))
.setDisableHealingElement(disableHealingElementDto.stream()
- .collect(Collectors.toMap(SelectorDto::getId, SelectorDto::getLocator)));
+ .collect(Collectors.toMap(SelectorDto::getId, SelectorDto::getLocator)))
+ .setFindElementsAutoHealing(configSelectorDto.isFindElementsAutoHealing());
}
}
diff --git a/src/main/java/com/epam/healenium/driver/InitDriver.java b/src/main/java/com/epam/healenium/driver/InitDriver.java
index 05aa204..ea21086 100644
--- a/src/main/java/com/epam/healenium/driver/InitDriver.java
+++ b/src/main/java/com/epam/healenium/driver/InitDriver.java
@@ -26,7 +26,6 @@ public class InitDriver {
public static SelfHealingDriver getDriver(){
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
- options.setHeadless(true);
options.addArguments("--remote-allow-origins=*");
WebDriver delegate = new ChromeDriver(options);
return SelfHealingDriver.create(delegate);
diff --git a/src/main/java/com/epam/healenium/model/ConfigSelectorDto.java b/src/main/java/com/epam/healenium/model/ConfigSelectorDto.java
index c3d5ab0..5314dfd 100644
--- a/src/main/java/com/epam/healenium/model/ConfigSelectorDto.java
+++ b/src/main/java/com/epam/healenium/model/ConfigSelectorDto.java
@@ -13,5 +13,5 @@ public class ConfigSelectorDto {
private boolean pathForKey;
private List disableHealingElementDto;
private List enableHealingElementsDto;
-
+ private boolean findElementsAutoHealing;
}
diff --git a/src/main/java/com/epam/healenium/model/SessionContext.java b/src/main/java/com/epam/healenium/model/SessionContext.java
index a548e52..cdfad52 100644
--- a/src/main/java/com/epam/healenium/model/SessionContext.java
+++ b/src/main/java/com/epam/healenium/model/SessionContext.java
@@ -21,5 +21,6 @@ public class SessionContext {
private BiFunction functionUrl;
private boolean waitCommand = false;
private boolean findElementWaitCommand = false;
+ private boolean findElementsAutoHealing = false;
}
diff --git a/src/main/java/com/epam/healenium/processor/GetReferenceElementsProcessor.java b/src/main/java/com/epam/healenium/processor/GetReferenceElementsProcessor.java
index d725605..b081e07 100644
--- a/src/main/java/com/epam/healenium/processor/GetReferenceElementsProcessor.java
+++ b/src/main/java/com/epam/healenium/processor/GetReferenceElementsProcessor.java
@@ -42,7 +42,7 @@ public boolean validate() {
if ("findElement".equals(context.getAction())) {
return context.getNoSuchElementException() != null;
}
- return false;
+ return engine.getSessionContext().isFindElementsAutoHealing();
}
@Override
diff --git a/src/test/java/com/epam/healenium/tests/HealTurnedOffTest.java b/src/test/java/com/epam/healenium/tests/HealTurnedOffTest.java
index f7dbb41..f912043 100644
--- a/src/test/java/com/epam/healenium/tests/HealTurnedOffTest.java
+++ b/src/test/java/com/epam/healenium/tests/HealTurnedOffTest.java
@@ -39,7 +39,6 @@ public void createDriver() {
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
- options.setHeadless(true);
WebDriver delegate = new ChromeDriver(options);
Config config = ConfigFactory.load("test.conf");
driver = SelfHealingDriver.create(delegate, config);
diff --git a/src/test/java/com/epam/healenium/tests/SelenideTest.java b/src/test/java/com/epam/healenium/tests/SelenideTest.java
index b0ac48e..7d6a1ee 100644
--- a/src/test/java/com/epam/healenium/tests/SelenideTest.java
+++ b/src/test/java/com/epam/healenium/tests/SelenideTest.java
@@ -77,7 +77,6 @@ public WebDriver createDriver(Capabilities capabilities) {
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
- options.setHeadless(true);
options.merge(capabilities);
WebDriver wd = new ChromeDriver(options);
return SelfHealingDriver.create(wd);