Skip to content

Commit

Permalink
Merge pull request #246 from healenium/feature/EPMHLM-347
Browse files Browse the repository at this point in the history
EPMHLM-347
  • Loading branch information
Alex-Reif authored Oct 5, 2023
2 parents 3a8a7be + 9deb165 commit 310324b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.epam.healenium</groupId>
<artifactId>healenium-web</artifactId>
<version>3.4.4</version>
<version>3.4.6</version>
<packaging>jar</packaging>
<name>healenium-web</name>
<description>healenium web client</description>
Expand Down Expand Up @@ -52,7 +52,7 @@
<maven.apache>3.8.4</maven.apache>
<typesafe.version>1.4.2</typesafe.version>
<treecomparing.version>0.4.12</treecomparing.version>
<selenium.version>4.10.0</selenium.version>
<selenium.version>4.13.0</selenium.version>
<jacksondatabind.version>2.15.2</jacksondatabind.version>
<commonslang3.version>3.12.0</commonslang3.version>
<commonscodec.version>1.15</commonscodec.version>
Expand All @@ -66,7 +66,7 @@
<selenide.version>6.1.1</selenide.version>
<testcontainersjunit.version>1.16.3</testcontainersjunit.version>
<junit.version>5.8.2</junit.version>
<webdrivermanager.version>5.1.0</webdrivermanager.version>
<webdrivermanager.version>5.5.3</webdrivermanager.version>
</properties>

<profiles>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/epam/healenium/SelfHealingEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/epam/healenium/driver/InitDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ public class ConfigSelectorDto {
private boolean pathForKey;
private List<SelectorDto> disableHealingElementDto;
private List<SelectorDto> enableHealingElementsDto;

private boolean findElementsAutoHealing;
}
1 change: 1 addition & 0 deletions src/main/java/com/epam/healenium/model/SessionContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public class SessionContext {
private BiFunction<SelfHealingEngine, String, String> functionUrl;
private boolean waitCommand = false;
private boolean findElementWaitCommand = false;
private boolean findElementsAutoHealing = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public boolean validate() {
if ("findElement".equals(context.getAction())) {
return context.getNoSuchElementException() != null;
}
return false;
return engine.getSessionContext().isFindElementsAutoHealing();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/test/java/com/epam/healenium/tests/SelenideTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 310324b

Please sign in to comment.