Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Disable healing option is not working as expected for locators found by findElements method #84

Open
ramendranamdev opened this issue Nov 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ramendranamdev
Copy link

ramendranamdev commented Nov 6, 2023

Describe the bug

Disable healing option is not working as expected for locators found by findElements method.
https://healenium.io/docs/disable_healing

Note: Healing disable is working perfectly fine for locators found by findElement method.

Healenium: 1.3.6
Healenium Backend: 3.4.1
Healenium Web: 3.4.6

Selenium Version: 4.13.0
Platform: Java 17
Environment: Windows Server 2019

Python Version: 3
PostgerSQL Version: 16

How to reproduce the issue

1) Run below given test testSelfHealingDisableForFindElements as a first successful iteration to save locators into healenium backend/db
2) Open Selectors page using url http://localhost:7878/healenium/selectors
3) Search for saved element from step 1: By.xpath(//*[contains(text(), 'This is a very simple HTML file')])
4) Disable healing for found element from Step 3
5) Repeat step 1 to run 2nd iteration of test to check healing disablement for locator from step 4

Actual Result
Element is getting self healed even after disabling healing for it from /selectors page.

Expected Result
Healing should not happen for locators, for which healing is disabled from /selectors page.

Note: Healing disable is working perfectly fine for locators found by findElement method.


============================================================

@Test
    public void testSelfHealingDisableForFindElements(){
        WebDriver delegate = new ChromeDriver();
        SelfHealingDriver selfHealingDriver = SelfHealingDriver.create(delegate);
        RemoteWebDriver driver = selfHealingDriver.getDelegate();
        String xpath = "//*[contains(text(), 'This is a very simple HTML file')]";
        selfHealingDriver.navigate().to("http://www.brainjar.com/java/host/test.html");

        WebElement element = selfHealingDriver.findElements(By.xpath(xpath)).get(0);
        Assert.assertTrue(element.isDisplayed(),"Component Displaying");
        driver.executeScript("document.getElementsByTagName('p')[0].innerText = \"ABC\";");
        element = selfHealingDriver.findElements(By.xpath(xpath)).get(0);
        Assert.assertTrue(element.isDisplayed(),"Component Displaying");
        driver.close();
    }

Logs appeared during using Healenium

NA

Expected behavior

Healing should not happen for locators, for which healing is disabled from /selectors page.

https://healenium.io/docs/disable_healing

Actual behavior

Element is getting self healed even after disabling healing for it from /selectors page.

Healenium Web version

3.4.6

Healenium Backend version

3.4.1

Selenium version

4.13.0

Platform

Java

Additional context

image

@ramendranamdev ramendranamdev added the bug Something isn't working label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants