healenium / healenium-web

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

[BUG]: Self healing is not working , it just highlights different elements and the Java code does not progress #234

Closed Swathi-VL closed 1 year ago

Swathi-VL commented 1 year ago

Describe the bug

I'm trying yo test self healing for my web application , healing is not working , it just highlights different elements and the script does not progress , I have to stop the runner from debug mode, I'm using healenium without docker

How to reproduce the issue

Start healenium pgadmin db 
download services 
start healenium 
debug the test case in cucumber java selenium healenium project 
stop at debug point 
change the webelement and run the test 
healenium has to heal

Logs appeared during using Healenium

2023-06-06 16:29:51.988  INFO 10596 - [7878-exec-9] healenium                        : [Get Reference] Request: RequestDto(locator=By.xpath: //div[@id='createdBy']/child::span/div,By.xpath: //div[@id='createdBy']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:30:13.054  INFO 10596 - [7878-exec-6] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='dateCreated']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:30:34.095  INFO 10596 - [7878-exec-1] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='dateChanged']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:31:15.176  INFO 10596 - [7878-exec-3] healenium                        : [Get Reference] Request: RequestDto(locator=By.xpath: //div[@id='changedBy']/child::span/div,By.xpath: //div[@id='changedBy']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:31:36.232  INFO 10596 - [7878-exec-4] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='homePhone']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:31:57.255  INFO 10596 - [7878-exec-8] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='workPhone']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:32:18.288  INFO 10596 - [7878-exec-5] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='mobilePhone']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:32:39.318  INFO 10596 - [7878-exec-2] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='homeFax']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:33:00.362  INFO 10596 - [878-exec-10] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='primaryEmail']/child::span[1]/child::div, className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:33:41.457  INFO 10596 - [7878-exec-7] healenium                        : [Get Reference] Request: RequestDto(locator=By.xpath: //div[@id='secondaryEmail']/child::span/child::div,By.xpath: //div[@id='secondaryEmail']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:34:02.514  INFO 10596 - [7878-exec-9] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='preferredContact1']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:34:23.534  INFO 10596 - [7878-exec-6] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='preferredContact2']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:34:44.586  INFO 10596 - [7878-exec-1] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='preferredContact3']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:35:05.626  INFO 10596 - [7878-exec-3] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='preferredContact4']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:35:26.698  INFO 10596 - [7878-exec-4] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='communicationLanguage']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:35:47.754  INFO 10596 - [7878-exec-8] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='receiveMarketing']/child::div[2]/child::div, className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:36:08.796  INFO 10596 - [7878-exec-5] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='boolean1']/child::div[2]/child::div, className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:36:29.885  INFO 10596 - [7878-exec-2] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='gender']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:36:50.950  INFO 10596 - [878-exec-10] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='salutation']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:37:12.035  INFO 10596 - [7878-exec-7] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='type']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:37:33.281  INFO 10596 - [7878-exec-9] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='status']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:37:54.328  INFO 10596 - [7878-exec-6] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='whiteLabel']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:38:35.438  INFO 10596 - [7878-exec-1] healenium                        : [Get Reference] Request: RequestDto(locator=By.xpath: //div[@id='association']/child::span/div,By.xpath: //div[@id='association']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:39:16.524  INFO 10596 - [7878-exec-3] healenium                        : [Get Reference] Request: RequestDto(locator=By.xpath: //div[@id='organization']/child::span/div,By.xpath: //div[@id='organization']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:39:37.587  INFO 10596 - [7878-exec-4] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='refCaseworker']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:39:58.629  INFO 10596 - [7878-exec-8] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='firstName']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:40:19.659  INFO 10596 - [7878-exec-5] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='middleName']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers)) 
2023-06-06 16:40:40.717  INFO 10596 - [7878-exec-2] healenium                        : [Get Reference] Request: RequestDto(locator=//div[@id='surname']/child::div[2], className=pages.newUI.NewUICustomerPage, methodName=clickAddCustomer, command=findElement, url=https://sps.qa.dev.ibapplications.com/customers))

Expected behavior

healenium has to heal the changed web element

Actual behavior

healenium just higlights webelements , does not heal and progress

Healenium Web version

3.4.2

Healenium Backend version

1.3.3

Selenium version

4.1.2

Platform

Java

Properties file

recovery-tries=1 score-cap=.7 heal-enabled=true serverHost=localhost serverPort=7878 imitatePort=8000

Additional context

Test

amang06fa commented 1 year ago

@Swathi-VL did you try updating your selenium version to 4.9.0 it works fine for me