You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to implement healenium in my code. but I am facing "java.lang.NoSuchMethodError: 'org.openqa.selenium.remote.http.Contents$Supplier org.openqa.selenium.remote.http.HttpResponse.getContent()'" issue:
if (HTTP_NOT_FOUND == response.getStatus()) {
throw new RuntimeException("[Get Elements] Compatibility error. Hlm-backend service must be 3.3.0 and height." +
"\nActual versions you can find here: https://github.com/healenium/healenium/blob/master/docker-compose-web.yaml");
}
Supplier<InputStream> result = response.getContent(); **//Failed this Point in Last**
configSelectorDto = objectMapper.readValue(result.get(), new TypeReference<ConfigSelectorDto>() {
});
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
log.warn("[Get Elements] Error during call. Message: {}, Exception: {}", e.getMessage(), e.toString());
}
return configSelectorDto;
}
/**
When I try to open : http://localhost:7878/healenium/elements on my Chrome
{"urlForKey":false,"pathForKey":false,"disableHealingElementDto":[],"enableHealingElementsDto":[],"findElementsAutoHealing":false}
Describe the problem
HI Team
I try to implement healenium in my code. but I am facing "java.lang.NoSuchMethodError: 'org.openqa.selenium.remote.http.Contents$Supplier org.openqa.selenium.remote.http.HttpResponse.getContent()'" issue:
@test
public void FirstTest() {
}
This Code Failed
static SelfHealingDriver create(WebDriver delegate) {
SelfHealingEngine selfHealingEngine = new SelfHealingEngine(delegate);
setEngineFields(delegate, selfHealingEngine);
callInitActions(selfHealingEngine); //Failed this Point
return create(selfHealingEngine);
}
static void callInitActions(SelfHealingEngine selfHealingEngine) {
selfHealingEngine.loadStoredSelectors(); //Failed this Point
selfHealingEngine.initReport();
}
SelfHealingEngine(config=Config(SimpleConfigObject({"backlight-healing":true,"file":{"encoding":"UTF-8","separator":"\"},"heal-enabled":true,"hlm":{"imitator":{"url":"http://localhost:8000"},"server":{"url":"http://localhost:7878"}},"java":{"class":{"path":"C:\\Users\\DNA\\eclipse\\java-2024-122\\eclipse\\configuration\\org.eclipse.osgi\\529\\0\\.cp\\lib\\testng-remote.jar;C:\\Users\\DNA\\Desktop\\GS_PatchOrg\\Patch_Code\\gs-automation\\target\\test-classes;C:\\Users\\DNA\\Desktop\\GS_PatchOrg\\Patch_Code\\gs-automation\\target\\classes;C:\\Users\\DNA\\.m2\\repository\\org\\testng\\testng\\6.10\\testng-6.10.jar;C:\\Users\\ DNA\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\ DNA\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\DNA\.m2\repository\io\github\bonigarcia\webdrivermanager\5.6.2\webdrivermanager-5.6.2.jar;C:\Users\DNA\.m2\repository\org\slf4j\slf4j-api\2.0.9\slf4j-api-2.0.9.jar;C:\Users\DNA\.m2\repository\com\google\code\gson\gson\2.10.1\gson-2.10.1.jar;C:\Users\DNA\.m2\repository\com\github\docker-java\docker-java\3.3.4\docker-java-3.3.4.jar;C:\Users\DNA\.m2\repository\com\github\docker-java\docker-java-core\3.3.4\docker-java-core-3.3.4.jar;C:\Users\DNA\.m2\repository\com\github\docker-java\docker-java-api\3.3.4\docker-java-api-3.3.4.jar;C:\Users\DNA\.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.76\bcpkix-jdk18on-1.76.jar;C:\Users\DNA\.m2\repository\org\bouncycastle\bcprov-jdk18on\1.76\bcprov-jdk18on-1.76.jar;C:\Users\DNA\.m2\repository\org\bouncycastle\bcutil-jdk18on\1.76\bcutil-jdk18on-1.76.jar;C:\Users\ DNA\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;C:\Users\DNA\.m2\repository\com\github\docker-java\docker-java-transport-httpclient5\3.3.4\docker-java-transport-httpclient5-3.3.4.jar;C:\Users\ DNA\.m2\repository\com\github\docker-java\docker-java-transport\3.3.4\docker-java-transport-3.3.4.jar;C:\Users\DNA\.m2\repository\net\java\dev\jna\jna\5.13.0\jna-5.13.0.jar;C:\Users\DNA\.m2\repository\org\brotli\dec\0.1.2\dec-0.1.2.jar;C:\Users\DNA\.m2\repository\org\apache\commons\commons-compress\1.24.0\commons-compress-1.24.0.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\client5\httpclient5\5.2.1\httpclient5-5.2.1.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\core5\httpcore5\5.2\httpcore5-5.2.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\core5\httpcore5-h2\5.2\httpcore5-h2-5.2.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-java\4.11.0\selenium-java-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-api\4.11.0\selenium-api-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\4.11.0\selenium-chrome-driver-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-chromium-driver\4.11.0\selenium-chromium-driver-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v113\4.11.0\selenium-devtools-v113-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v114\4.11.0\selenium-devtools-v114-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v115\4.11.0\selenium-devtools-v115-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v85\4.11.0\selenium-devtools-v85-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\4.11.0\selenium-edge-driver-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\4.11.0\selenium-firefox-driver-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\4.11.0\selenium-ie-driver-4.11.0.jar;C:\Users\DNA\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\4.11.0\selenium-safari-driver-4.11.0.jar;C:\Users\ DNA\.m2\repository\org\seleniumhq\selenium\selenium-support\4.11.0\selenium-support-4.11.0.jar;C:\Users\DNA\.m2\repository\javax\mail\mail\1.4.5\mail-1.4.5.jar;C:\Users\DNA\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\DNA\.m2\repository\com\saucelabs\saucerest\1.0.23\saucerest-1.0.23.jar;C:\Users\DNA\.m2\repository\com\googlecode\json-simple\json-simple\1.1\json-simple-1.1.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\httpclient\4.3.1\httpclient-4.3.1.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\httpcore\4.3\httpcore-4.3.jar;C:\Users\DNA\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\DNA\.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Users\DNA\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\DNA\.m2\repository\org\apache\poi\poi\3.15\poi-3.15.jar;C:\Users\DNA\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\DNA\.m2\repository\org\apache\commons\commons-collections4\4.1\commons-collections4-4.1.jar;C:\Users\DNA\.m2\repository\net\sourceforge\jexcelapi\jxl\2.6.12\jxl-2.6.12.jar;C:\Users\DNA\.m2\repository\com\relevantcodes\extentreports\2.40.2\extentreports-2.40.2.jar;C:\Users\DNA\.m2\repository\org\jsoup\jsoup\1.8.3\jsoup-1.8.3.jar;C:\Users\DNA\.m2\repository\org\xerial\sqlite-jdbc\3.8.11.1\sqlite-jdbc-3.8.11.1.jar;C:\Users\DNA\.m2\repository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;C:\Users\DNA\.m2\repository\org\apache\commons\commons-text\1.9\commons-text-1.9.jar;C:\Users\ DNA\.m2\repository\org\jboss\aerogear\aerogear-otp-java\1.0.0\aerogear-otp-java-1.0.0.jar;C:\Users\ DNA\.m2\repository\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;C:\Users\DNA\.m2\repository\io\rest-assured\rest-assured\5.1.1\rest-assured-5.1.1.jar;C:\Users\DNA\.m2\repository\org\apache\groovy\groovy\4.0.1\groovy-4.0.1.jar;C:\Users\DNA\.m2\repository\org\apache\groovy\groovy-xml\4.0.1\groovy-xml-4.0.1.jar;C:\Users\DNA\.m2\repository\org\apache\httpcomponents\httpmime\4.5.13\httpmime-4.5.13.jar;C:\Users\DNA\.m2\repository\org\hamcrest\hamcrest\2.1\hamcrest-2.1.jar;C:\Users\DNA\.m2\repository\org\ccil\cowan\tagsoup\tagsoup\1.2.1\tagsoup-1.2.1.jar;C:\Users\DNA\.m2\repository\io\rest-assured\json-path\5.1.1\json-path-5.1.1.jar;C:\Users\DNA\.m2\repository\org\apache\groovy\groovy-json\4.0.1\groovy-json-4.0.1.jar;C:\Users\RDNA\.m2\repository\io\rest-assured\rest-assured-common\5.1.1\rest-assured-common-5.1.1.jar;C:\Users\DNA\.m2\repository\io\rest-assured\xml-path\5.1.1\xml-path-5.1.1.jar;C:\Users\DNA\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Users\DNA\.m2\repository\com\epam\healenium\healenium-web\3.5.4\healenium-web-3.5.4.jar;C:\Users\DNA\.m2\repository\org\apache\maven\maven-artifact\3.9.7\maven-artifact-3.9.7.jar;C:\Users\DNA\.m2\repository\org\codehaus\plexus\plexus-utils\3.5.1\plexus-utils-3.5.1.jar;C:\Users\DNA\.m2\repository\org\apache\maven\maven-plugin-api\3.9.7\maven-plugin-api-3.9.7.jar;C:\Users\DNA\.m2\repository\org\apache\maven\maven-model\3.9.7\maven-model-3.9.7.jar;C:\Users\DNA\.m2\repository\org\eclipse\sisu\org.eclipse.sisu.plexus\0.9.0.M2\org.eclipse.sisu.plexus-0.9.0.M2.jar;C:\Users\DNA\.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;C:\Users\ DNA\.m2\repository\org\eclipse\sisu\org.eclipse.sisu.inject\0.9.0.M2\org.eclipse.sisu.inject-0.9.0.M2.jar;C:\Users\DNA\.m2\repository\org\codehaus\plexus\plexus-component-annotations\2.1.0\plexus-component-annotations-2.1.0.jar;C:\Users\DNA\.m2\repository\org\codehaus\plexus\plexus-classworlds\2.8.0\plexus-classworlds-2.8.0.jar;C:\Users\DNA\.m2\repository\com\typesafe\config\1.4.2\config-1.4.2.jar;C:\Users\ DNA\.m2\repository\com\epam\healenium\tree-comparing\0.4.14\tree-comparing-0.4.14.jar;C:\Users\ DNA\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.15.2\jackson-databind-2.15.2.jar;C:\Users\DNA\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.15.2\jackson-annotations-2.15.2.jar;C:\Users\DNA\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.15.2\jackson-core-2.15.2.jar;C:\Users\ DNA\.m2\repository\org\jetbrains\annotations\23.0.0\annotations-23.0.0.jar;C:\Users\ DNA\.m2\repository\org\mapstruct\mapstruct\1.4.2.Final\mapstruct-1.4.2.Final.jar;C:\Users\DNA\.m2\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;C:\Users\DNA\.m2\repository\org\slf4j\slf4j-simple\2.0.9\slf4j-simple-2.0.9.jar;C:\Users\DNA\.m2\repository\one\util\streamex\0.8.1\streamex-0.8.1.jar;C:\Users\DNA\.m2\repository\org\eclipse\jetty\jetty-server\11.0.21\jetty-server-11.0.21.jar;C:\Users\DNA\.m2\repository\org\eclipse\jetty\jetty-http\11.0.21\jetty-http-11.0.21.jar;C:\Users\DNA\.m2\repository\org\eclipse\jetty\jetty-util\11.0.21\jetty-util-11.0.21.jar;C:\Users\DNA\.m2\repository\org\eclipse\jetty\jetty-io\11.0.21\jetty-io-11.0.21.jar;C:\Users\Rin...
After Code going :
public void loadStoredSelectors() {
ConfigSelectorDto configSelectorDto = client.getElements(); //Failed this Pont
if (configSelectorDto != null) {
List disableHealingElementDto = configSelectorDto.getDisableHealingElementDto();
List enableHealingElementsDto = configSelectorDto.getEnableHealingElementsDto();
BiFunction<SelfHealingEngine, String, String> urlFunction = getUrlFunction(configSelectorDto.isUrlForKey());
sessionContext = new SessionContext()
.setFunctionUrl(urlFunction)
.setEnableHealingElements(enableHealingElementsDto.stream()
.collect(Collectors.toMap(SelectorDto::getId, SelectorDto::getLocator)))
.setDisableHealingElement(disableHealingElementDto.stream()
.collect(Collectors.toMap(SelectorDto::getId, SelectorDto::getLocator)))
.setFindElementsAutoHealing(configSelectorDto.isFindElementsAutoHealing());
}
}
client.getElements() :
RestClient(serverUrl=http://localhost:7878/healenium, imitateUrl=http://localhost:8000/imitate, sessionKey=cbcc1d090b85a526ed462c98a8f3df90, objectMapper=com.fasterxml.jackson.databind.ObjectMapper@44114b9f, mapper=com.epam.healenium.mapper.HealeniumMapper@76bf1bb8, serverHttpClient=org.openqa.selenium.remote.http.netty.NettyClient@2a235b8e, imitateHttpClient=org.openqa.selenium.remote.http.netty.NettyClient@76536c53)
public ConfigSelectorDto getElements() {
ConfigSelectorDto configSelectorDto = null;
try {
HttpRequest request = new HttpRequest(HttpMethod.GET, "/elements");
request.setHeader("Cache-Control", "no-cache");
log.debug("[Get Elements] Request: {}", request);
HttpResponse response = serverExecute(request);
When I try to open : http://localhost:7878/healenium/elements on my Chrome
{"urlForKey":false,"pathForKey":false,"disableHealingElementDto":[],"enableHealingElementsDto":[],"findElementsAutoHealing":false}
it showing.
Please Help me
Healenium Web version
3.5.4
Healenium Backend version
https://github.com/healenium/healenium-backend
Selenium version
4.11.0
Platform
JAVA
Logs appeared during using Healenium
Additional context
No response
The text was updated successfully, but these errors were encountered: