Self-healing Selenium Test Using Healenium with Anna Chernysheva
8 Dec 2025 · 21 min
Anna Chernysheva explains Healenium, an open-source layer for Selenium that fixes broken tests automatically. When a locator fails, it compares the old page structure to the current one and suggests a new locator so tests keep running. It's stable for Java and coming to other languages through a proxy approach.
Questions this episode answers
February 27, 2022.
Yes — Helenium is open source.
Java (stable version).
A modified longest-common-segment (longest common subsequence/segment) variant with weighted attributes and parent–child relationships.
Yes — Maven and Gradle plugins (with screenshots and user feedback controls).
Chapters
Welcome to the Test Guild Automation Podcast.
Where we all get together to learn.
More about automation and software testing with.
Your host Joe Calantonio.
Hey it's Joe and welcome to another episode of the Test Guild Automation Podcast. Today we'll be talking with Anna all about Helium, an open source solution to help you create self healing selenium web tests. If you don't know, Anna is a quality architect with a progressive experience in automation testing. A lot of a lot of in depth detail and experience contributing to open source projects. But I'm really excited about she loves open source and is one of the creators of the BDD Test Automation library Akita and the self healing library Helium, which I'm probably saying wrong but we'll find out. And she's the Program committee member of the largest or one of the largest technical conferences about software testing. Heisenberg. Recently she joined Atomic Jar. Atomic Jaw was on the show maybe a few months ago. Really cool things going on there as a customer success engineer and is super inspired to bring Test Container Cloud to success. So as you can tell she has lots of experience on lots of different things. Who knows where it's going to take us but you don't want to miss this episode. Check it out. The Test Guild Automation Podcast is sponsored by the fantastic folks at Source Labs, the cloud based test platform that helps ensure you can develop with confidence at every step from code to deployment for Every framework, browser, OS, mobile device and API. Get a free trial. Visit testguild.comSourceLabs and click on the exclusive Sponsor section to try it for free today. Check it out. Hey Anna, welcome to the Guild.
Hello. Great to be here.
Awesome to have you.
Your pronounced almost right. It's Helenium so that's good.
Hellenium. Okay, Helenium. I'm always going to get it wrong.
So I'll just like Healing and Selenium and together it's Helenium.
Awesome. Awesome. So Anna, before we get into it, is there anything else I missed in your bio that you want the Guild to know more about?
I think everything was correct. Yes, I really love open source projects. I did a lot of contribution and like to share my knowledge and everything with the community. And yes, I recently joined Atomic Jar. Very great company and I think that Test Containers cloud will be very successful tool as Test Containers is very popular library. So I guess that cloud solutions will be more and more popular nowadays especially when Docker Desktop is going to be paid and people are using M1 MacBooks where not all images are supported. So cloud solutions will help with this awesome.
And I guess I'm already off script, but for the folks that may have missed the episode I did on test containers, could you give like a quick high level. What is test containers for? Especially. Especially for testers. Why do you think it's important?
Yes. So test containers is a library to make integration testing as easy as unit testing when you need to run something. For example, your application is dependent on Kafka and to test, to run integration tests, you don't need to set up Kafka locally, but you can include the test containers Kafka module and it will be started automatically in the Docker container. So it's very easy to set up and you can run integration tests without extra effort.
Nice. Now how about Selenium tests? Can you run Selenium tests and test containers and what would be the benefits of that?
Yeah, there are different modules. So we have also module for Selenium and it's also like very easy. You just write run this test in container, start container with Selenium and everything will be predefined in this container.
Awesome. So I guess the first main topic is, you know, most people when they write Selenium test, a lot of times they call it flaky. And the reason why it's usually flaky is either network issues or like object identification issues at runtime. So let's just lead up, I guess what is Helenium? So what's the benefits of Helenium then? People that don't know what it is.
So I as a test automation engineer on my previous projects used to write Selenium tests and figure out the issue that very often when developers making some updates and not notifying QA team, especially the enterprise projects. Finally we see that our automated Selenium tests, they are not passing because some UI elements were changed. For example, they changed ID and Helenium helped to fix this test in the runtime. So with Helenium we will not have test failures due to UI changes.
Nice. And so how does it work? Is it. Does it use AI machine learning? Is it like Selenium IDE where it has like backup locators that it uses? If it doesn't find the first one.
It uses kind of machine learning algorithm. So we have different components in Helenium and we have algorithm components that is communicated with web part. So we implemented modification of longest common success algorithm. It is an algorithm from dynamic programming and dynamic programming is kind of method of optimization and optimization methods. They are used in AI. So we name it kind of machine learning algorithm because it's close to it, but still need to be a little bit updated to be true machine learning. So from the first test run we take the DOM object of our page and save every locator to the element which was used in the test, but not like XPath or CSS locator, but in the kind of sequence of parent child nodes and their relationship with attributes. So how can we get to for example this red button from the top of the page. And then in the next test run, if ID of this button changes and we use ID to find it in our automated scripts, Helenium will see that receive no such element exception that this element is not present and we'll take a look at the previous state, take the current state of this element, compare them and propose new locator. Will execute search with this new locator in the runtime and if search will be successful, it will just mark the test green and the step of the test green and proceed with other test steps.
Okay, so let me see, following along, it's almost like it sounds like it takes like metadata of everything around that particular object. So if one thing of that object change, it has like a not a library, I don't know what you call it, but like a bunch of other data could say, okay, well here, here are four other pieces of information about this object that match. So let's use this other. Let's guess what the other identifier is to find it. Is that how it works?
So we catch no suchelement exception and C for the previous state. So for this node sequence, so we have kind of graph of the web page with all the nodes to all the elements and each node is a sequence of elements. Using longest common segments algorithm, we are defining the longest subsequence for our target 1 and this subsequence on the current page will be our target element. But we also include not only the relationship of parent child of this node, but metadata like attributes and others. So we have weights coefficients for this.
Cool, cool. Does this add any time performance runtime when you use this method or does it only kick in when it doesn't find it so it doesn't add any extra overhead on the runtime?
We have some delays, but right now it's kind of known pro problem for our project and at the last iteration we solved it. Like when we trying to find one element catch no such elements exception and generating new locator for this healed locator for this element. We will not trigger healing process for this concrete element if it will be used in the other Tests so it will be triggered only once and then we will use healed locator for the other tests. But comparing to the whole test run without Helenium, if we have a lot of failures due to no such element exception, we will not have a big PID updates because like when we have a lot of failed locators it will slow down all test suite. But with Helenium at the end it will be faster anyway.
Nice. So I love this solution. I know a lot of ones I've seen are all paid, so I don't think we mentioned. I believe this is open source, is that correct?
Yes, it's totally open source.
Nice. So I know you're one of the main contributors. So do you have any, I don't know, examples or stories where someone before someone implemented this, what it was like and how after implementing it their tests became more stable? Are there any, any examples you can give how it makes your end to end test more stable? I guess is the question.
Yeah, I have one good example. So we had a project with different environments predefined and they used Hybris as a CMS system to generate some UI components. And for test environment it was configured to generate one form of locators. And for staging environment Hybris was configured to generate locators with some prefix. So we had like two similar pages, but on those two environments they had different locators. So it was kind of specific of the project and this difference was requested by customer. So we have a story about it. And we integrated tests with Helenium for this project. So we had number of end to end tests that were run on the test and on staging environment and project. With all this test automation they had separate page objects, one for test environment and one for staging. So completely the same but with different locators. With usage of Helenium they can run the same suite of tests on these two environments and removed a lot of page objects from their test framework. And also they had kind of speed increase into test automation because when creating a new test they didn't created two page objects by created only one defined it in the test. So at the end, test automation engineers, they increased the speed of test automation during the sprint and I'm sure it.
Took care of a lot of maintenance and code duplication. Because that's, that's a great, that's a great example.
Yes, yes, yes.
So I guess the question that then is say someone's listening to us. They say, this sounds great, but I already have, you know, a test suite of 2,000 5,000 10,000 tests. How hard is this to implement an existing framework? Is it easy to do? How does that work?
Yep, it's quite easy. All you need to do is to add dependency of Helenium to your current test automation framework and specify not like Selenium driver but wrap it into self healing driver and that's it.
Nice. So is this only for Java? Is it just a Java implementation like.
The stable version is for Java but we have in development and like released recently version that will be applicable for different languages but it has a little bit different approach. So with current stable version that is applicable for Java you should add dependency as a library to test framework and run Helenium backend also. Yeah, you need to run Helenium backend to store this information regarding locators. But right now to support multi language support we created a proxy that works on the level between test Automation framework and Selenium webdriver. So all helink executes in this proxy. So proxy takes care of no such element exceptions and proposing new locators to the webdriver so in this way it can be applicable for any kind of language that uses Selenium.
Very cool. So I know a lot of people are thinking so if it does fail or if it does use a replacement, is there any extra reporting that shows so they know that okay it did make a change and that it made the right decision or I can trust that whatever change it or whatever it decided on was the right the right change to go with?
Yep. We also have plugins right now for Maven and for Gradle with reporting but I guess they are applicable for proxies soon as well. So in this report you will see what locators were healed for what concrete elements with the screenshot and also with the button where you can select was healing successful or not. So if you click that it wasn't successful. We are collecting data regarding these concrete elements and modify our algorithm to use maybe other weights coefficients to generate new healed locator. So based on the user feedback algorithm of proposition of new healing elements will be modified.
Perfect. Now I also saw that it works on mobile, so does that mean it works for Appium or does it just mean it works on all browsers and mobile emulators or something? How does it work with mobile for Appium?
So we tested it with one project setup and it worked fine. But recently it appeared that not we can't support all Appium versions so it's maybe not too stable right now but for one project it worked very well. And like we Are working to support it for other project setups.
Nice. So someone implemented this. Could they run it in parallel or in virtual, like in test containers or like. Does it have any limitations?
No test can be run on any kind of environment that supports Selenium. It doesn't affect the way how you run your tests. It's affecting only success of your element strategies.
I know another thing people usually struggle with is iframes. Do you know if it works with things like iframes?
Yeah, yeah, it works. Made this update about, I don't know, half a year ago or maybe more to support iframes. So actually we have a test project on like Test UI where we run our tests to verify that the new version of Helenium works fine. And there we have iframes tests that uses JavaScript actions and other stuff that is commonly used in Selenium based tests just to verify that this function works and everything is good with the new Helenium version.
Now I know you said it works with Selenium, but I think I also saw worked with Selenide, which is a cool framework. Does it work for any other frameworks?
As of now it supports Selenite. Yes and we tested it with one more project. Let me remember. I don't remember the name of this library, but yeah, it supports libraries based on Selenium. So it will work with this kind of library, any kind of library.
Okay, so I guess if you're using Java and Selenium. If a framework uses Java and Selenium, it's just importing this library and it should work, I assume.
Yeah.
Cool. Is there anything else with the functionality that people need to know about that you think would be cool or given benefit? It seems simple, but it's something like one of the biggest obstacles I've seen automation engineers struggle with to make the test more reliable for sure. So I don't know if there's any function other functionality built in that that helps as well.
We implemented recently a library that helps to generate more beautiful locators. So like Helenium has a long story but a small team. So we going like step by step with little steps and had an issue with locators like it proposes locator to use for this concrete test run like hilt locator but sometimes they were ugly with very big XPath that is not supportable. But we created a Python library that works as a separate Docker container and it just beautifies the locators and can generate locator based on what you use in test automation framework. So for example if you tried to locate to find element by ID and ID was changed and Helenium changed it to the actual one. So the library will return you the beautiful locator of find element by id. So this one, this was a good improvement. Current usage.
Nice. How'd you get involved with this project? I think if I read correctly, this originated in epom.
Yes.
And EPOM has like Report Portal and a bunch of other. Did you work at EPOM or did you just see this and go, oh, this is cool, let me contribute.
I worked at EPAM and started it in epam. Actually the initial idea of Helenium was born between communication of me and Dmitri Guminuk who is creator of Report Portal. We just discussed that. Oh, it will be good to have some library or to have some solution to fix this problem of unstable UI tests. And then I started to investigate how to solve this issue. What we can do. We started with other algorithms that didn't work. Then we found some very good guy, very mature in this algorithm things and data science. So we involved him and then build a small team. Right now it's three teammates who is developing this project. But the main development team is still in epam. And right now as I joined Atomic Jar, I'm just looking for this project, like what's going on there, Help team with some solutions and just monitor and doing some small pull requests.
Awesome. So thank you for coming up with this idea. I think it's brilliant and folks are going to love it, I'm sure, so they definitely need to try it. So you also contributed to Ankita? Yeah, it's a BDD framework, but it looks like the page I landed on was in Russian. So what's Ankita?
This project I started before EPAM in one of the Russian banks. So we had a situation with a lot of Scrum teams and a lot of manual test engineers that not really mature in test automation, but we need to have test automation. So me and our test automation team decided to create a framework that can be shared between manual testers and which they can use to build test automation scripts. So this is a library that contains steps like open the page, click button, enter text. This kind of steps so that people without technical knowledge can just write them to combine scenario and run this scenario and it will be automated.
Very cool. So is there any other open source projects you're working on or plan on working on? You just focus totally on Atomic Jar right now.
Right now, Totally Atomic Jar. But Atomic Jar has test containers. It's also open sourced.
Yep, yep. Right, right.
I already committed small changes to Selenium module.
Awesome.
Yep. And Helenium I involved still a little bit involved into this project and as it's kind of was my beginning, I always interested in what's going on there and strive to help the team.
Love it. Okay Anna, before we go, is there one piece of actual advice you can give to someone to help them with their automation testing efforts and what's the best way to find or contact you the action?
I would say just do what you love and you will reach success in it. And regarding contacts, I'm available at LinkedIn, Facebook, also in GitHub and I registered in Twitter recently. Still no posts, but I will post something I guess.
Thanks again for your automation awesomeness. The links to everything of value we covered in this episode. Head on over to test guild.com forward/a388 and while you're there, make sure to click on the Try for Free Today link under the Exclusive Sponsor section to learn all about Sauce Lab's awesome products and services. And if the show has helped you in any way, why not rate it and review it in itunes? Reviews really help in the rankings of the show and I read each and every one of them. So that's it for this episode of the Test Guild Automation Podcast. I'm Joe. My mission is to help you succeed with creating end to end full stack Automation awesomeness. As always, test everything and keep the good. Cheers. Thanks for listening to the Test Guild Automation Podcast. Head on over to testguild.com for full show notes, amazing blog articles and online testing conferences. Don't forget to subscribe to the Guild.
To continue your testing journey.
More from JoeBot
Automation Testing Podcast 2026: New Schedule, Events, Discounts with Joe Colantonio
Automation Guild Kickoff, AWS Nova, Karate v2, and AI Testing Reality and more TGNS177