healenium / healenium-web

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

Healing is not working for real DOM change #94

Closed bhuvana-m closed 3 years ago

bhuvana-m commented 3 years ago

Hi @DzmitryHumianiuk , Healing is not working even there is a DOM level change in the application also the healenium-example project is not healing for the sample site .Getting New element have not been found " exception Logs for reference:

2021-04-28 15:51:08.833 WARN 1 - [7878-exec-5] .DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of java.util.ArrayList<com.epam.healenium.treecomparing.Node> out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList<com.epam.healenium.treecomparing.Node> out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 163] (through reference chain: com.epam.healenium.model.dto.SelectorRequestDto["nodePath"]->java.util.ArrayList[0])]

Thanks , Bhuvana

DzmitryHumianiuk commented 3 years ago

@GannaChernyshova ^

GannaChernyshova commented 3 years ago

Hi @bhuvana-m! What version of Healenium are you using?

bhuvana-m commented 3 years ago

Hi @GannaChernyshova , Tried both 3.0.2 and 3.0 3 beta version . I have cloned the healenium-example-maven project from the github repo and tried to execute the markuptest class but the same error displayed

It was working previously .recently only noticed the issue

GannaChernyshova commented 3 years ago

Is hlm-backend is up and running?

bhuvana-m commented 3 years ago

Yes it running Anna. Both hlm backend and db is running

alexis9205110 commented 3 years ago

Hi. I have the same error. I think that the tree-comparing-0.4.8 jar is corrupted.

image

bhuvana-m commented 3 years ago

Hi @alexis9205110 , Yes Alexis,even I feel the same. @GannaChernyshova , Please provide solution for the above issue

GannaChernyshova commented 3 years ago

Hi @bhuvana-m, @alexis9205110 we are working on artefacts migration from JCenter bintray to Maven Central because JCenter is going to the sunset. In few days issues with dependencies will be fixed

Alex-Reif commented 3 years ago

Hi @bhuvana-m, Would you write me in Skype please, and we'll discuss more detail there. My Skype: live:9e28d39b52d0dafd

bhuvana-m commented 3 years ago

Thanks for the update @GannaChernyshova Sure will connect @alexis9205110

bhuvana-m commented 3 years ago

@alexis9205110 @GannaChernyshova Do we have any temporary solution for this issue

GannaChernyshova commented 3 years ago

Hi @alexis9205110 @bhuvana-m please try the latest version healenium-web:3.0.3-beta-8

GannaChernyshova commented 3 years ago

@alexis9205110 @bhuvana-m Hi! Have you solved the issue with new version?

bhuvana-m commented 3 years ago

Hi @GannaChernyshova , The healing is working when using direct findelement method but its not working when elementTobeclickable() or other expectedcondotiona methods used.it's getting failed to find the healed locator

Ex:invisibiliyyofElementLocated(final by locator) *** Element info: {Using=xpath, value=//button[@id='pearsonAddressSubmit']} Trying to heal... [main] WARN com.epam.healenium.service.impl.HealingServiceImpl - Using healed locator: Optional[Scored(score=0.9185714285714286, value=By.cssSelector: button#pearsonAddressSave)] May 20, 2021 10:33:08 AM org.openqa.selenium.remote.Augmenter extractRemoteWebDriver WARNING: Augmenter should be applied to the instances of @Augmentable classes or previously augmented instances only (instance class was: class org.openqa.selenium.chrome.ChromeDriver) 2021-05-20 10:33:16 INFO : Waiting until the element By.xpath: //button[@id='pearsonAddressSubmit'] becomes clickable [main] WARN com.epam.healenium.handlers.proxy.BaseHandler - Failed to find an element using locator By.xpath: //button[@id='pearsonAddressSubmit'] Reason: Failed to find pageElements

GannaChernyshova commented 3 years ago

Hi @bhuvana-m To verify invisibility of element to should use @DisableHealing annotation on the method. If element is not present in DOM Healenium can't heal it. Also could you please provide an example of your code with elementTobeclickable()? We checked on our side and everything works fine to this kind of expected conditions.