healenium / healenium-web

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

[BUG]: Error transform sourcePath making screenshot not shown in reports #239

Closed jesmartorres24 closed 1 year ago

jesmartorres24 commented 1 year ago

Describe the bug

Error transform sourcePath making screenshot not shown in reports

How to reproduce the issue

- Setup postgres healenium account
- created a test script to test healing
- it healed the element
- it created a screenshot folder
- opened reports page and src didn't edit the absolute path.

Logs appeared during using Healenium

[Build Report] Error transform sourcePath: C:\Users\{user\path}\screenshots\83c74b400b362e1652c048fc73cce5ef\screenshot_30-Jun-2023-03-37-10.616.png
WARN 23832 - [7979-exec-5] healenium : [Build Report] Error transform sourcePath: C:\Users\{user\path}\screenshots\83c74b400b362e1652c048fc73cce5ef\screenshot_30-Jun-2023-03-37-10.616.png
2023-07-05 08:31:16.468  WARN 23832 - [7979-exec-2] healenium : [Build Report] Error transform sourcePath: C:\Users{user\path}\screenshots\83c74b400b362e1652c048fc73cce5ef\screenshot_30-Jun-2023-03-37-10.616.png

edited the absolute path for confidentiality

Expected behavior

Screenshot will appear in reports page

Actual behavior

It doesn't load

Healenium Web version

1.3.4

Healenium Backend version

3.3.4

Selenium version

4.9.1

Platform

Java

Properties file

recovery-tries = 1 score-cap = 0.5 heal-enabled = true hlm.server.url = http://localhost:7979 hlm.imitator.url = http://localhost:8000

Additional context

This is what it looks like when I load reports page. image

changed the src and removed the absolute path to start with /screenshots/ image

This is what the logs show when I try to load the image. image

Alex-Reif commented 1 year ago

Hi @jesmartorres24 , We will fix it in next release.

Alex-Reif commented 1 year ago

Hi @jesmartorres24 , Issue fixed in the hlm-backend 3.4.0. Update service, please.

jesmartorres24 commented 1 year ago

Hi @Alex-Reif, thank you so much. It's now working properly. :)