Closed praktheo closed 2 years ago
YAML:
version: "3.3"
services:
db:
image: postgres:11-alpine
ports:
- "5432:5432"
volumes:
- ./db/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
environment:
- POSTGRES_DB=healenium
- POSTGRES_USER=healenium_user
- POSTGRES_PASSWORD=YDk2nmNs4s9aCP6K
networks:
- healenium
healenium:
image: healenium/hlm-backend:3.1.4
ports:
- "7878:7878"
links:
- db
restart: always
environment:
- SPRING_CONTAINER_NAME=healenium
- SPRING_POSTGRES_DB=healenium
- SPRING_POSTGRES_USER=healenium_user
- SPRING_POSTGRES_PASSWORD=YDk2nmNs4s9aCP6K
- SPRING_POSTGRES_URL=jdbc:postgresql://db:5432/healenium?currentSchema=healenium
networks:
- healenium
selector-imitator:
image: healenium/hlm-selector-imitator:1
restart: on-failure
ports:
- "8000:8000"
networks:
healenium:
Hello @praktheo ! To start healing process of locator you don't need to change your locator in test code. Healing will work if locator which you previously use has been changed in DOM. Correct me if I misunderstood you.
I am doing a POC. So I need to check the static website whether the web elements are updated after locaters are changed in DOM.
I have edited my index.html of the static web page and check the webelements are updating in run time.
https://www.automatetheplanet.com/healenium-self-healing-tests/
I took above link as reference
Kindly let me know if I am doing anything wrong
Kindly help me on this. Let me know if any other details needed.
I am also gettig the same issue. Kindly help in reolsing the issue.
Kindly help me on this. Let me know if any other details needed.
please let me know if you have resolved this issue. thanks.
Hello @praktheo , @rohitgera15 Please use org.jsoup 1.11.3v +
Hi Team,
I am using Cucumber Selenium with page object model. After first run completed. I have changed the first name and last name element. I am seeing below error during healing.
Maven Dependency:
hlm-backend: Image: healenium/hlm-backend:3.1.4 Ports: 0.0.0.0:7878->7878/tcp, :::7878->7878/tcp
Exception Stack Trace: 10-28-2021 21:44:30 - [com.epam.healenium.handlers.proxy.BaseHandler / lookUp][WARN ] - Failed to find an element using locator By.id: firstName Reason: no such element: Unable to locate element: {"method":"css selector","selector":"#firstName"} (Session info: chrome=95.0.4638.54) For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'CHNMCT407601L', ip: '10.110.43.73', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 95.0.4638.54, chrome: {chromedriverVersion: 95.0.4638.54 (d31a821ec901f..., userDataDir: C:\Users\kamalasekaran.p\Ap...}, goog:chromeOptions: {debuggerAddress: localhost:59844}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true} Session ID: b7de32e6ce9933535e06b9f51f6b565f *** Element info: {Using=id, value=firstName} Trying to heal... java.lang.NoSuchMethodError: 'org.jsoup.nodes.Node org.jsoup.nodes.Document.root()' at com.epam.healenium.treecomparing.JsoupHTMLParser.parse(JsoupHTMLParser.java:25) at com.epam.healenium.SelfHealingEngine.parseTree(SelfHealingEngine.java:273) at com.epam.healenium.SelfHealingEngine.findNearest(SelfHealingEngine.java:240) at com.epam.healenium.SelfHealingEngine.findNewLocations(SelfHealingEngine.java:198) at com.epam.healenium.service.impl.AbstractHealingServiceImpl.healLocator(AbstractHealingServiceImpl.java:54) at com.epam.healenium.service.impl.HealingServiceImpl.heal(HealingServiceImpl.java:42) at com.epam.healenium.handlers.proxy.BaseHandler.lookUp(BaseHandler.java:91) at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:56) at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39) at com.sun.proxy.$Proxy20.findElement(Unknown Source) at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69) at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38) at com.sun.proxy.$Proxy23.sendKeys(Unknown Source) at pages.CheckoutFormPage.enterFirstName(CheckoutFormPage.java:33) at step_definitions.CheckoutFormSteps.enterFirstNameAndLastName(CheckoutFormSteps.java:33) at â?½.Enter first name: Test and last name: Automation(file:///C:/Users/kamalasekaran.p/avonbrochure_automated_uat/src/test/java/features/checkoutForm.fea ture:6)
Static Web Page:
The highlighted elements are changed and not healed