healenium / healenium-web

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

[Need support]: New element locator have not been found. There is a lack of reference data. #185

Closed hemanth-tr closed 1 year ago

hemanth-tr commented 2 years ago

Describe the problem

I ran the pure tests first and made changes to element id and ran the tests again, unfortunately tests are failed. When i took a look at the proxy logs i noticed following log.

WARN 3940 --- [nio-8085-exec-4] c.e.h.processor.HealingProcessor : New element locator have not been found. There is a lack of reference data.

Healenium Web version

None

Healenium Backend version

1.0

Selenium version

4.1.1

Platform

.NET

Properties file

There is no properties file when we run tests on .NET. Note: Needed components are installed in a server and RemoteWebDriver is pointed to that server healenium-proxy.

http://{server-ip}:8085

Note: application.yml in healenium-proxy project is updated accordingly

Logs appeared during using Healenium

2022-06-14 05:45:41.357  WARN 3940 --- [nio-8085-exec-4] c.e.h.processor.FindElementProcessor     : Failed to find an element using locator By.cssSelector: #UserName
Reason: no such element: Unable to locate element: {"method":"css selector","selector":"#UserName"}
  (Session info: chrome=102.0.5005.115)
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: '{server-name}', ip: '{server-ip}', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '18.0.1.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [40bd3e6049ff6e4158dba5974c12b75f, findElement {using=css selector, value=#UserName}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.115, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: C:\Users\SUSHRI~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:55602}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: {}, se:cdp: ws://{server-ip}:4444/sess..., se:cdpVersion: 102.0.5005.115, 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: 40bd3e6049ff6e4158dba5974c12b75f
Trying to heal...
2022-06-14 05:45:41.877  WARN 3940 --- [nio-8085-exec-4] c.e.h.processor.HealingProcessor         : New element locator have not been found. There is a lack of reference data.
2022-06-14 05:45:41.879 ERROR 3940 --- [nio-8085-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#UserName"}
  (Session info: chrome=102.0.5005.115)
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: '{server-name}', ip: '{server-ip}', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '18.0.1.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [40bd3e6049ff6e4158dba5974c12b75f, findElement {using=css selector, value=#UserName}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.115, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: C:\Users\SUSHRI~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:55602}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: {}, se:cdp: ws://{server-ip}:4444/sess..., se:cdpVersion: 102.0.5005.115, 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: 40bd3e6049ff6e4158dba5974c12b75f] with root cause

org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#UserName"}
  (Session info: chrome=102.0.5005.115)
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: '{server-name}', ip: '{server-ip}', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '18.0.1.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [40bd3e6049ff6e4158dba5974c12b75f, findElement {using=css selector, value=#UserName}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.115, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: C:\Users\SUSHRI~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:55602}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: {}, se:cdp: ws://{server-ip}:4444/sess..., se:cdpVersion: 102.0.5005.115, 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: 40bd3e6049ff6e4158dba5974c12b75f
    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483) ~[na:na]
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:184) ~[selenium-remote-driver-4.1.0.jar:na]
    at com.epam.healenium.healenium_proxy.command.HealeniumCommandExecutor.execute(HealeniumCommandExecutor.java:28) ~[classes/:na]
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:162) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:60) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:383) ~[selenium-remote-driver-4.1.0.jar:na]
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:375) ~[selenium-remote-driver-4.1.0.jar:na]
    at com.epam.healenium.processor.FindElementProcessor.execute(FindElementProcessor.java:24) ~[healenium-web-3.2.4.jar:na]
    at com.epam.healenium.processor.BaseProcessor.process(BaseProcessor.java:41) ~[healenium-web-3.2.4.jar:na]
    at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:58) ~[healenium-web-3.2.4.jar:na]
    at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39) ~[healenium-web-3.2.4.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy62.findElement(Unknown Source) ~[na:na]
    at com.epam.healenium.healenium_proxy.request.post.override.HealeniumFindElementPostRequest.getHealingResponse(HealeniumFindElementPostRequest.java:116) ~[classes/:na]
    at com.epam.healenium.healenium_proxy.request.post.override.HealeniumFindElementPostRequest.execute(HealeniumFindElementPostRequest.java:89) ~[classes/:na]
    at com.epam.healenium.healenium_proxy.request.post.HealeniumPostRequest.execute(HealeniumPostRequest.java:41) ~[classes/:na]
    at com.epam.healenium.healenium_proxy.handler.HealeniumProxyHttpHandler.handleRequest(HealeniumProxyHttpHandler.java:23) ~[classes/:na]
    at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.56.jar:4.0.FR]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.15.jar:5.3.15]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.56.jar:4.0.FR]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.15.jar:5.3.15]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.15.jar:5.3.15]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.15.jar:5.3.15]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-06-14 05:45:42.691  INFO 3940 --- [nio-8085-exec-5] c.e.h.h.r.delete.HealeniumDeleteRequest  : Report available at http://localhost:7878/healenium/report/40bd3e6049ff6e4158dba5974c12b75f

Additional context

No response

ElenaStepuro commented 2 years ago

Hello @hemanth-tr , please, update backend version to 3.2.2 and proxy version to 0.2.5. Version 1.0 doesn't support Selenium 4

hemanth-tr commented 2 years ago

Hello @hemanth-tr , please, update backend version to 3.2.2 and proxy version to 0.2.5. Version 1.0 doesn't support Selenium 4

Thanks for the quick response @ElenaStepuro and Support.

Since am running healenium without docker in a server, can you please let me know, where I would get the latest version of proxy and backend?

ElenaStepuro commented 2 years ago

Here you can find repository for backend with latest changes: https://github.com/healenium/healenium-backend And here for proxy: https://github.com/healenium/healenium-proxy

hemanth-tr commented 2 years ago

@ElenaStepuro i did that in docker first before doing it on server, seems like elements are not healed yet. :(

image

Alex-Reif commented 2 years ago

Hello @hemanth-tr, "New element locator have not been found. There is a lack of reference data." means etalon data has not survived after pure tests. Kindly check data appropriate locator in the "selector" table of postgres database.

rasikasub commented 2 years ago

Hi @Aliaksei-Ashukha @ElenaStepuro : I am facing a similar issue. Elements are not healed. I get the error

[main] WARN com.epam.healenium.processor.FindElementProcessor - Failed to find an element using locator By.cssSelector: .search-icon1
Reason: no such element: Unable to locate element: {"method":"css selector","selector":".search-icon1"}

Here are details docker-compose.yml

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.2.2
    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
    networks:
      - healenium

  selector-imitator:
    image: healenium/hlm-selector-imitator:1.1
    restart: on-failure
    ports:
      - "8000:8000"

networks:
  healenium:

CONTAINER LOGS Log for healenium/hlm-backend:3.2.2 container

`SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hlm-backend.jar!/BOOT-INF/lib/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hlm-backend.jar!/BOOT-INF/lib/slf4j-simple-1.7.28.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.0.RELEASE)

2022-07-04 15:08:02.207  INFO 1 - [       main] com.epam.healenium.Application   : Starting Application on 67664a5340e7 with PID 1 (/hlm-backend.jar started by root in /) 
2022-07-04 15:08:02.222  INFO 1 - [       main] com.epam.healenium.Application   : No active profile set, falling back to default profiles: default 
2022-07-04 15:08:04.426  INFO 1 - [       main] .RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode. 
2022-07-04 15:08:04.944  INFO 1 - [       main] .RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 466ms. Found 4 repository interfaces. 
2022-07-04 15:08:06.004  INFO 1 - [       main] elegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
2022-07-04 15:08:06.738  INFO 1 - [       main] o.s.b.w.e.t.TomcatWebServer      : Tomcat initialized with port(s): 7878 (http) 
2022-07-04 15:08:06.766  INFO 1 - [       main] o.a.c.core.StandardService       : Starting service [Tomcat] 
2022-07-04 15:08:06.767  INFO 1 - [       main] o.a.c.core.StandardEngine        : Starting Servlet engine: [Apache Tomcat/9.0.27] 
2022-07-04 15:08:07.057  INFO 1 - [       main] o.a.c.c.C.[.[localhost].[/]      : Initializing Spring embedded WebApplicationContext 
2022-07-04 15:08:07.058  INFO 1 - [       main] o.s.web.context.ContextLoader    : Root WebApplicationContext: initialization completed in 4668 ms 
2022-07-04 15:08:07.830  INFO 1 - [       main] c.z.hikari.HikariDataSource      : HikariPool-1 - Starting... 
2022-07-04 15:08:08.078  INFO 1 - [       main] c.z.hikari.HikariDataSource      : HikariPool-1 - Start completed. 
2022-07-04 15:08:08.969  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM public.databasechangeloglock 
2022-07-04 15:08:09.001  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.databasechangeloglock (ID INTEGER NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT DATABASECHANGELOGLOCK_PKEY PRIMARY KEY (ID)) 
2022-07-04 15:08:09.014  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM public.databasechangeloglock 
2022-07-04 15:08:09.018  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : DELETE FROM public.databasechangeloglock 
2022-07-04 15:08:09.020  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangeloglock (ID, LOCKED) VALUES (1, FALSE) 
2022-07-04 15:08:09.026  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT LOCKED FROM public.databasechangeloglock WHERE ID=1 
2022-07-04 15:08:09.037  INFO 1 - [       main] l.l.StandardLockService          : Successfully acquired change log lock 
2022-07-04 15:08:10.488  INFO 1 - [       main] .StandardChangeLogHistoryService : Creating database history table with name: public.databasechangelog 
2022-07-04 15:08:10.490  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.databasechangelog (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP WITHOUT TIME ZONE NOT NULL, ORDEREXECUTED INTEGER NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10)) 
2022-07-04 15:08:10.498  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM public.databasechangelog 
2022-07-04 15:08:10.500  INFO 1 - [       main] .StandardChangeLogHistoryService : Reading from public.databasechangelog 
2022-07-04 15:08:10.502  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT * FROM public.databasechangelog ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC 
2022-07-04 15:08:10.504  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM public.databasechangeloglock 
2022-07-04 15:08:10.544  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE SEQUENCE public.healing_result_seq START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 
2022-07-04 15:08:10.546  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Sequence healing_result_seq created 
2022-07-04 15:08:10.548  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/001_createSequence.xml::3::nkobzev ran successfully in 5ms 
2022-07-04 15:08:10.550  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : SELECT MAX(ORDEREXECUTED) FROM public.databasechangelog 
2022-07-04 15:08:10.555  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('3', 'nkobzev', 'changelog/001_createSequence.xml', NOW(), 1, '8:29a9cd23d232d4fb20baf667e86f5764', 'createSequence sequenceName=healing_result_seq', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.560  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.SELECTOR (UID VARCHAR(64) NOT NULL, URL VARCHAR NOT NULL, CLASS_NAME VARCHAR(264) NOT NULL, METHOD_NAME VARCHAR(264) NOT NULL, LOCATOR VARCHAR NOT NULL, NODE_PATH VARCHAR NOT NULL, CREATE_DATE TIMESTAMP(6) WITHOUT TIME ZONE DEFAULT NOW()) 
2022-07-04 15:08:10.565  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Table SELECTOR created 
2022-07-04 15:08:10.567  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/002_selector.xml::5::nkobzev ran successfully in 8ms 
2022-07-04 15:08:10.569  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('5', 'nkobzev', 'changelog/002_selector.xml', NOW(), 2, '8:e1b7eb8ae03e3815e1de142d1fbb99d8', 'createTable tableName=SELECTOR', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.642  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE UNIQUE INDEX SELECTOR_PK ON public.SELECTOR(UID) 
2022-07-04 15:08:10.647  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Index SELECTOR_PK created 
2022-07-04 15:08:10.649  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/002_selector.xml::6::nkobzev ran successfully in 76ms 
2022-07-04 15:08:10.650  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('6', 'nkobzev', 'changelog/002_selector.xml', NOW(), 3, '8:5b47d9d4efe64c312d16093ec343ef8b', 'createIndex indexName=SELECTOR_PK, tableName=SELECTOR', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.654  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.HEALING (UID VARCHAR(64) NOT NULL, SELECTOR_ID VARCHAR(64) NOT NULL, PAGE_CONTENT VARCHAR, CREATE_DATE TIMESTAMP(6) WITHOUT TIME ZONE DEFAULT NOW()) 
2022-07-04 15:08:10.660  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Table HEALING created 
2022-07-04 15:08:10.662  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/003_healing.xml::7::nkobzev ran successfully in 9ms 
2022-07-04 15:08:10.664  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('7', 'nkobzev', 'changelog/003_healing.xml', NOW(), 4, '8:185453203a0745603724ed1f88d89072', 'createTable tableName=HEALING', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.737  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE UNIQUE INDEX HEALING_PK ON public.HEALING(UID) 
2022-07-04 15:08:10.744  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Index HEALING_PK created 
2022-07-04 15:08:10.747  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : ALTER TABLE public.HEALING ADD CONSTRAINT "FK_HEALING-SELECTOR" FOREIGN KEY (SELECTOR_ID) REFERENCES public.SELECTOR (UID) ON UPDATE RESTRICT ON DELETE RESTRICT 
2022-07-04 15:08:10.751  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Foreign key constraint added to HEALING (SELECTOR_ID) 
2022-07-04 15:08:10.753  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/003_healing.xml::8::nkobzev ran successfully in 85ms 
2022-07-04 15:08:10.755  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('8', 'nkobzev', 'changelog/003_healing.xml', NOW(), 5, '8:1cbc4e32e82511813da2bbb5f417cf54', 'createIndex indexName=HEALING_PK, tableName=HEALING; addForeignKeyConstraint baseTableName=HEALING, constraintName=FK_HEALING-SELECTOR, referencedTableName=SELECTOR', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.761  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.HEALING_RESULT (ID BIGINT NOT NULL, LOCATOR VARCHAR NOT NULL, HEALING_ID VARCHAR(64) NOT NULL, SCORE DOUBLE PRECISION DEFAULT 0 NOT NULL, SUCCESS_HEALING BOOLEAN NOT NULL, CREATE_DATE TIMESTAMP(6) WITHOUT TIME ZONE DEFAULT NOW()) 
2022-07-04 15:08:10.768  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Table HEALING_RESULT created 
2022-07-04 15:08:10.770  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/004_healingResult.xml::9::nkobzev ran successfully in 10ms 
2022-07-04 15:08:10.772  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('9', 'nkobzev', 'changelog/004_healingResult.xml', NOW(), 6, '8:ce193cd426f788e4da879ce7e5a906a5', 'createTable tableName=HEALING_RESULT', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.857  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE UNIQUE INDEX HEALING_RESULT_PK ON public.HEALING_RESULT(ID) 
2022-07-04 15:08:10.863  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Index HEALING_RESULT_PK created 
2022-07-04 15:08:10.864  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : ALTER TABLE public.HEALING_RESULT ADD CONSTRAINT "FK_HEALING_RESULT-HEALING" FOREIGN KEY (HEALING_ID) REFERENCES public.HEALING (UID) ON UPDATE RESTRICT ON DELETE RESTRICT 
2022-07-04 15:08:10.867  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Foreign key constraint added to HEALING_RESULT (HEALING_ID) 
2022-07-04 15:08:10.868  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/004_healingResult.xml::10::nkobzev ran successfully in 93ms 
2022-07-04 15:08:10.870  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('10', 'nkobzev', 'changelog/004_healingResult.xml', NOW(), 7, '8:410ebcc8054f199e42e065fb67a34087', 'createIndex indexName=HEALING_RESULT_PK, tableName=HEALING_RESULT; addForeignKeyConstraint baseTableName=HEALING_RESULT, constraintName=FK_HEALING_RESULT-HEALING, referencedTableName=HEALING', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.875  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE TABLE public.REPORT (UID VARCHAR(64) NOT NULL, ELEMENTS VARCHAR NOT NULL, CREATE_DATE TIMESTAMP(6) WITHOUT TIME ZONE DEFAULT NOW()) 
2022-07-04 15:08:10.881  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Table REPORT created 
2022-07-04 15:08:10.883  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/005_report.xml::11::nkobzev ran successfully in 9ms 
2022-07-04 15:08:10.884  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('11', 'nkobzev', 'changelog/005_report.xml', NOW(), 8, '8:7e8b2fd40c67bfe7bfb0121f0cc0a1d5', 'createTable tableName=REPORT', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:10.986  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : CREATE UNIQUE INDEX REPORT_PK ON public.REPORT(UID) 
2022-07-04 15:08:10.991  INFO 1 - [       main] liquibase.changelog.ChangeSet    : Index REPORT_PK created 
2022-07-04 15:08:10.994  INFO 1 - [       main] liquibase.changelog.ChangeSet    : ChangeSet changelog/005_report.xml::12::nkobzev ran successfully in 106ms 
2022-07-04 15:08:10.995  INFO 1 - [       main] l.executor.jvm.JdbcExecutor      : INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('12', 'nkobzev', 'changelog/005_report.xml', NOW(), 9, '8:f4832a719db0e5fdcbd7dd88a9c10cad', 'createIndex indexName=REPORT_PK, tableName=REPORT', '', 'EXECUTED', NULL, NULL, '3.7.0', '6936490506') 
2022-07-04 15:08:11.004  INFO 1 - [       main] l.l.StandardLockService          : Successfully released change log lock 
2022-07-04 15:08:11.217  INFO 1 - [       main] o.h.j.internal.util.LogHelper    : HHH000204: Processing PersistenceUnitInfo [name: default] 
2022-07-04 15:08:11.399  INFO 1 - [       main] org.hibernate.Version            : HHH000412: Hibernate Core {5.4.6.Final} 
2022-07-04 15:08:11.834  INFO 1 - [       main] o.h.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final} 
2022-07-04 15:08:12.185  INFO 1 - [       main] org.hibernate.dialect.Dialect    : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 
2022-07-04 15:08:14.573  WARN 1 - [       main] o.h.m.internal.MetadataContext   : HHH015011: Unable to locate static metamodel field : com.epam.healenium.model.domain.Selector_#nodePathWrapper; this may or may not indicate a problem with the static metamodel 
2022-07-04 15:08:14.594  INFO 1 - [       main] h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 
2022-07-04 15:08:14.616  INFO 1 - [       main] ontainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 
2022-07-04 15:08:16.092  INFO 1 - [       main] o.s.s.c.ThreadPoolTaskExecutor   : Initializing ExecutorService 'applicationTaskExecutor' 
2022-07-04 15:08:17.255  INFO 1 - [       main] .s.b.a.e.w.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' 
2022-07-04 15:08:17.366  INFO 1 - [       main] o.s.b.w.e.t.TomcatWebServer      : Tomcat started on port(s): 7878 (http) with context path '' 
2022-07-04 15:08:17.370  INFO 1 - [       main] com.epam.healenium.Application   : Started Application in 16.69 seconds (JVM running for 17.877) 
2022-07-04 15:09:36.589  INFO 1 - [7878-exec-1] o.a.c.c.C.[.[localhost].[/]      : Initializing Spring DispatcherServlet 'dispatcherServlet' 
2022-07-04 15:09:36.589  INFO 1 - [7878-exec-1] o.s.w.s.DispatcherServlet        : Initializing Servlet 'dispatcherServlet' 
2022-07-04 15:09:36.610  INFO 1 - [7878-exec-1] o.s.w.s.DispatcherServlet        : Completed initialization in 20 ms `

Log for continer healenium/hlm-selector-imitator:1.1

image

Please note after for pure test, the "selector" table of the postgres database does contains the relevant data..

Could you help me here?

hemanth-tr commented 2 years ago

Hello @hemanth-tr, "New element locator have not been found. There is a lack of reference data." means etalon data has not survived after pure tests. Kindly check data appropriate locator in the "selector" table of postgres database.

Hi @Aliaksei-Ashukha,

I took a look at posgresql database and found that each time we run the test it is a whole new set of data for healenium because, our landing page url contains varying data i.e, timestamp. So, when the element identification is changed and we run the test, selenium would not find the element obviously and healenium wouldn't either because there is no selector exists at this point as timestamp in url is changed. Is there anyway to get around this?

Alex-Reif commented 2 years ago

Hi @hemanth-tr , Thanks for your details. We understood your problem. We are assessing the one. We let you know about results and time frame.

hemanth-tr commented 2 years ago

Thanks @Aliaksei-Ashukha , appreciate your quick response on this.

mayukh-kant commented 2 years ago

Hi @hemanth-tr , Thanks for your details. We understood your problem. We are assessing the one. We let you know about results and time frame.

+1, We have the same problem.

Alex-Reif commented 2 years ago

Hi @hemanth-tr , @mayukh-kant Issue was fixed at hlm-backend 3.2.4: https://github.com/healenium/healenium-web/issues/204#issuecomment-1231792830