Question: The rate at which AI tools keep coming up feels like they are going to replace Selenium and other conventional automation tools sooner than we think. But, as of now what are the real life practical limitations of such tools? Can somebody share their project experience?

**EDIT:**

This question is basically asking to address the limitations of AI backed "codeless" automation tools like the one described above when compared to Selenium (or other "codeful" automation tools).

Answer: 
First of all: "Selenium automates browsers. That's it!" (Quote from [SeleniumHQ](https://www.seleniumhq.org/).) It provides an open-source, standardized, and widely-used interface to drive browsers, respectively, web applications. This not just enables developers/testers/… to use it for testing purposes, but also it can be used by vendors to build different kinds of testing tools/frameworks/… on top of it. Because of this, I think that a) Selenium is gonna stay for a very long time and b) the progress in the field of AI-based testing is mostly unrelated to Selenium's lifetime expectations.

> 
> "Because some things will be better done using them. Other things will be better done using Selenium" My question is to know exactly what those things are.
> 
> 
> 

Since you mention products like mabl and Testim, I assume you focus on GUI-based system testing for web applications? Today, most of such (off-the-shelf) tools that incorporate some sort of AI basically can be divided into the following two main categories (although some also fit in both):

1. Test maintenance: the tool takes care of maintenance tasks such as updating locators after changes or carrying out special checks to detect visual differences.
2. Test generation: the tool generates actual tests that can be executed. For instance, automated exploration to find broken links or the creation of regression test suites.

When it comes to test maintenance, machines can—as already pointed out by [João Farias](https://sqa.stackexchange.com/a/36567/21973)—easily process vast amounts of data, which is a huge advantage here. For instance, when the system under test (SUT) changes, you often find yourself fixing a bunch of locators. In contrast, machines can use historical data to assign new and old locators in order to "auto-heal" tests.

However, in the case of test generation, humans are usually superior. While machines can use various techniques to create non-functional tests, they have a hard time to generate actual functional tests that effectively cover particular use cases and business needs. In general, I think this relates to the testing vs. checking debate (see my answer [here](https://sqa.stackexchange.com/a/29477/21973)).
First of all, lets set some context on why this is the situation, then I will share my thoughts on limitations of AI based tools.

For the past several decades, the biggest challenge with automated testing has been the issue of **maintenance**. How many times have you been in this situation where, say you write 10 tests, you run them and it passes. You are super happy!!! Then, you come in the next day only to find out that all the 10 tests are failing because the elements in the pages have changed. I have been in this situation so many times. *Research suggests that on an average, a tester spends 30% of his/her time in just maintaining these tests*. Can you imagine the opportunity cost associated with this effort?

Then, we have couple of other issues. One is the **availability of skilled resources**, as they are expensive and getting the right kind of people to do test automation takes considerable amount of time and effort. Then, we have the **cost of getting these resources and training them** as they quite often do not come cheap.

Selenium is a great open source framework to do test automation and it is FREE, but suffers because of the above mentioned issues. That is why we have AI based testing tools and they have become popular in the past few years. Companies started thinking ***“When someone can provide all these features for us, why do I have to suffer by doing everything on my own with the Selenium framework?”***. This is exactly what happened which has resulted in people moving away from the Selenium framework to more robust vendor solutions. This is ***just like how people thought “Wow I love Blackberry’s” and then the iPhone came in and made Blackberry’s non-existent because the iPhone could provide all the features in one package***; and some of the features even the customers did not know they needed them but got hooked on to it.

This being said, it does not mean Selenium is going to get replaced. It is just going to force the open source community (The chief committers to the Selenium project) to do more work and try to fix the existing problems with the framework and make it more easier to use even for non-technical people. Again remember that, the Selenium framework is maintained by people who like to help the community and most of them do not get paid to do it. So what you see is what you get and we cannot complain about it. Rather, look at the advantages and limitations and make our automation suite better.

Speaking of limitations, AI tools do have their own limitations just like Selenium. 

* Each vendor tool you see currently are good in one aspect of test automation like either authoring, execution or maintenance. There are very few tools that do all 3 seamlessly in an integrated way
* Most of the tools have some algorithm behind the scenes trying to do self-healing i.e fixing issues proactively before they occur. In order for the algorithms to get smarter, it needs more data and more users. So, until the vendors have a lot of users using their product the algorithm may not have sufficient data to get smarter. In summary, it is going to take some more time to have complete autonomous testing
* Most of the tools are focused on making test automation easier and more stable but do not do complete test management with fancy dashboards and reporting like HP/ALM, TestRail etc.
* Most of the tool vendors do not have 24/7 customer support to help users get used to the tool and the AI behind the scenes.
* There are no open source AI based tools. So you will have to pay to use the features of these tools unlike Selenium which is FREE

So it all boils down to what you want to do, how much time, effort and cost you are willing to put in for test automation.

Hope this helps

-Raj