healenium / healenium-web

Self-healing library for Selenium Web-based tests
Apache License 2.0
170 stars 40 forks source link

[Need support]: Trying to heal... [main] WARN com.epam.healenium.processor.HealingProcessor - New element locator have not been found. There is a lack of reference data. #212

Closed haribabusunkari closed 2 years ago

haribabusunkari commented 2 years ago

Describe the problem

Trying to heal... [main] WARN com.epam.healenium.processor.HealingProcessor - New element locator have not been found. There is a lack of reference data.

Healenium setup as mentioned in https://github.com/healenium/healenium

Trying to automate facebook.com login page as login page has 1 dynamic element (Sign-In).

Verified selector table in postgres SQL .Locators are storing in selector table. But still healing is not happening when id of signin button changed.

Healenium Web version

3.2.5

Healenium Backend version

3.2.4

Selenium version

4.1.0

Platform

Java + TestNG

Properties file

No response

Logs appeared during using Healenium

[RemoteTestNG] detected TestNG version 7.4.0
Nov 02, 2022 6:56:59 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer
INFO: Using OpenTelemetry for tracing
Nov 02, 2022 6:57:08 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[main] WARN com.epam.healenium.processor.FindElementProcessor - Failed to find an element using locator By.xpath: .//button[@id='u_0_5_VP']
Reason: no such element: Unable to locate element: {"method":"xpath","selector":".//button[@id='u_0_5_VP']"}
  (Session info: chrome=102.0.5005.61)
For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element
Build info: version: '4.1.0', revision: '87802e897b'
System info: host: 'DESKTOP-L911IRE', ip: '192.168.29.128', os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_351'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [374443f2de8fa189d78e5fcea7187060, findElement {using=xpath, value=.//button[@id='u_0_5_VP']}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.61, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: /tmp/.com.google.Chrome.T4Val1}, goog:chromeOptions: {debuggerAddress: localhost:36327}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 374443f2de8fa189d78e5fcea7187060
Trying to heal...
[main] WARN com.epam.healenium.processor.HealingProcessor - New element locator have not been found. There is a lack of reference data.
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//button[@id='u_0_5_VP']"}
  (Session info: chrome=102.0.5005.61)
For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element
Build info: version: '4.1.0', revision: '87802e897b'
System info: host: 'DESKTOP-L911IRE', ip: '192.168.29.128', os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_351'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [374443f2de8fa189d78e5fcea7187060, findElement {using=xpath, value=.//button[@id='u_0_5_VP']}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.61, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: /tmp/.com.google.Chrome.T4Val1}, goog:chromeOptions: {debuggerAddress: localhost:36327}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 374443f2de8fa189d78e5fcea7187060
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:184)
    at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:50)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
    at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:162)
    at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:60)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:383)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:375)
    at com.epam.healenium.processor.FindElementProcessor.execute(FindElementProcessor.java:24)
    at com.epam.healenium.processor.BaseProcessor.process(BaseProcessor.java:41)
    at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:58)
    at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39)
    at com.sun.proxy.$Proxy10.findElement(Unknown Source)
    at com.epam.healenium.tests.xPathTest.testXpathSpecialCharacter(xPathTest.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
    at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
    at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
    at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
    at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
    at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
    at java.util.ArrayList.forEach(Unknown Source)
    at org.testng.TestRunner.privateRun(TestRunner.java:794)
    at org.testng.TestRunner.run(TestRunner.java:596)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
    at org.testng.SuiteRunner.run(SuiteRunner.java:276)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
    at org.testng.TestNG.runSuites(TestNG.java:1063)
    at org.testng.TestNG.run(TestNG.java:1031)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
PASSED: testXpathSpecialCharacter

===============================================
    Default test
    Tests run: 1, Failures: 0, Skips: 0
===============================================

===============================================
Default suite
Total tests run: 1, Passes: 1, Failures: 0, Skips: 0
===============================================

Additional context

No response

Alex-Reif commented 2 years ago

Hi @haribabusunkari , please check stored locators go forward to http://localhost:7878/healenium/selectors

haribabusunkari commented 2 years ago

thanks @Aliaksei-Ashukha working today