healenium / healenium-example-maven

Test automation examples on Java with Maven.
26 stars 25 forks source link

[Need support]: New element locator have not been found. There is no reference data to selector in the database. #19

Open AdarshSingh003 opened 9 months ago

AdarshSingh003 commented 9 months ago

Describe the problem

I have read your FAQ section and also update the latest version of healenium web, selenium java according to the docker-compose.yml file but still get the same issue i am using docker please healp it is very urgent.

Console log.

[RemoteTestNG] detected TestNG version 7.8.0 [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 2 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 10 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 18 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 1 ms. [main] WARN org.testng.internal.Configuration - Detected a static method [demoHealenium.HealeniumDemoWithDocker.startTest()]. Static configuration methods can cause unexpected behavior. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 1 ms. [main] WARN org.testng.internal.Configuration - Detected a static method [demoHealenium.HealeniumDemoWithDocker.endTest()]. Static configuration methods can cause unexpected behavior. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 1 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 1 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 1 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 1 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 1 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.collectMethodsByGroup() took 0 ms. [main] INFO org.testng.internal.Utils - [Utils] MethodGroupsHelper.sortMethods() took 0 ms. [main] INFO org.testng.internal.Utils - [TestNG] Running: C:\Users\DYNAMIC MONSTERS\AppData\Local\Temp\testng-eclipse--1771937419\testng-customsuite.xml

[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Using chromedriver 114.0.5735.90 (resolved driver for Chrome 114) [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\DYNAMIC MONSTERS.cache\selenium\chromedriver\win32\114.0.5735.90\chromedriver.exe Starting ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}) on port 31948 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Sep 11, 2023 5:23:57 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch WARNING: Unable to find an exact match for CDP version 114, so returning the closest version found: 112 [main] INFO org.testng.internal.Utils - [Utils] DynamicGraphHelper.createDynamicGraph() took 7 ms. [main] WARN healenium - Failed to find an element using locator By.cssSelector: [name='Name'] [main] WARN healenium - Reason: no such element: Unable to locate element: {"method":"css selector","selector":"[name='Name']"} (Session info: chrome=114.0.5735.134) For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element Build info: version: '4.9.0', revision: 'd7057100a6' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '20.0.1' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [c7149607805ddac2e88e937615951127, findElement {using=css selector, value=[name='Name']}] Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 114.0.5735.134, chrome: {chromedriverVersion: 114.0.5735.90 (386bc09e8f4f..., userDataDir: C:\Users\DYNAMI~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:59242}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:59242/devtoo..., se:cdpVersion: 114.0.5735.134, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: c7149607805ddac2e88e937615951127 [main] WARN healenium - Trying to heal... [main] WARN healenium - New element locator have not been found. There is no reference data to selector in the database. Make sure that:

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

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

[main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@7c5df615: 53 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.jq.Main@12952aff: 137 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.FailedReporter@14b31e37: 89 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.XMLReporter@11c78080: 38 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.EmailableReporter2@616a06e3: 18 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@17222c11: 15 ms [main] INFO org.testng.internal.Utils - [TestNG] Time taken by org.testng.internal.ExitCodeListener@2db15f70: 0 ms

and also i have attached my project please help i have tried all the possible solution ;- demo.zip

Healenium Proxy version

1.3.0

Healenium Backend version

3.3.4

Selenium version

4.9.0

Logs appeared during using Healenium

NA

Additional context

this is my screenshot of docker.

Screenshot (202) Screenshot (203)

if you want to contact me for the help you can directly ping me on my mail :- aaddaarrsshh97@gmail.com please healp

adarsh12308 commented 9 months ago

Anyone please help because it's urgent

Alex-Reif commented 8 months ago

Hello @adarsh12308 , First off thanks for project and logs. As I can see by logs: 2023-09-11 01:03:24.906 INFO 1 - [7878-exec-3] healenium : [Save Elements] Request: By.cssSelector([name='Email']) 2023-09-11 01:09:29.531 INFO 1 - [7878-exec-7] healenium : [Get Reference] Request: RequestDto(locator=[name='Email'], className=demoHealenium.HealeniumDemoWithDocker, methodName=healeniumDemoWithDocker, command=findElement, url=http://6596641.tilda.ws/)) 2023-09-11 01:11:26.603 INFO 1 - [7878-exec-1] healenium : [Save Elements] Request: By.cssSelector([name='Email']) 2023-09-11 01:11:27.983 INFO 1 - [7878-exec-3] healenium : [Get Reference] Request: RequestDto(locator=[name='Name'], className=demoHealenium.HealeniumDemoWithDocker, methodName=healeniumDemoWithDocker, command=findElement, url=http://6596641.tilda.ws/))

Your locator was changed on the page and not in code. You didn't find element (name='Name') before that to store in the database as reference. Kindly run test suits successful to store all locators participated in the tests. And After that you can change locator on the page and Healenium will try to heal one.

adarsh12308 commented 8 months ago

Can we catch the healed locators from docker to show in my extent report if yes then how

AdarshSingh003 commented 7 months ago

Hello Healenium/Healenium-Example-Maven,

I am not able to get the report on local host 7878 port on same project can you tell me please it's very urgent please

Thanks & Regards Adarsh Singh

On Thu, 2 Nov, 2023, 4:36 pm Adarsh Singh, @.***> wrote:

Can we catch the healed locators from docker to show in my extent report if yes then how

— Reply to this email directly, view it on GitHub https://github.com/healenium/healenium-example-maven/issues/19#issuecomment-1790519906, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZE5ASUGD5JVSOXI2CPZLLYCN5DZAVCNFSM6AAAAAA4THSK56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQGUYTSOJQGY . You are receiving this because you authored the thread.Message ID: @.***>