Selenium Test Automation: What Are The Pros and Cons?
November 3, 2023
Selenium is an excellent tool packed with engineering wisdom
Some of the most popular tools for automating browser testing include Autify and Selenium, but how did Selenium become the tool of choice for engineers around the world? First, let’s take a quick look at its history.
Selenium was launched in May 2013 as a leading test automation tool. It was originally developed by Jason Huggins when he worked at ThoughtWorks in 2004.
A brief history of Selenium
Selenium→Selenium Core→Selenium RC (Remote Control)→Selenium IDE→ WebDriver→Selenium WebDriver→Selenium Builder
|2004||Jason Huggins of ThoughtWorks creates Selenium.
Selenium Core → Selenium-RC becomes open source.
|2006||Shinya Kasatani becomes interested in Selenium and develops Selenium IDE.|
|2007||Jason Huggins leaves ThoughtWorks to join Google.
Google talks about Selenium for the first time at the GTAC conference in New York.
Simon Stewart at ThoughtWorks develops WebDriver.
Simon introduces WebDriver at GTAC.
|2008||Selenium Grid is developed.|
|2009||Selenium RC and WebDriver are merged into Selenium WebDriver.|
|2013||Selenium is released.|
Simon Stewart’s WebDriver was merged with Shinya Kasatani’s Selenium IDE, giving a massive boost to Selenium’s versatility.
In July 2011, Selenium RC and WebDriver were merged to create Selenium WebDriver, and with further iterations, Selenium was released in May 2013 as the leading test automation tool, attracting worldwide attention.
*Selenium Builder was also developed as a tool that can record and playback browser interactions using only WebDriver commands.
Looking back at Selenium’s history, we can see that it was created by the collective wisdom of talented engineers during Google’s heyday. This is the background behind Selenium’s popularity.
Despite being an excellent tool, Selenium is offered as an open-source test automation tool that anyone can freely use. Next, let’s discuss the benefits of using Selenium.
Advantages of Selenium test automation
Selenium is generally known as a framework for automating browser testing, but more specifically, Selenium is very good at web scraping (extracting data on the Web).
With Selenium, you can record actions and create test cases. For example, it can automatically get Google search ranking data and save a screenshot of the SERP. Even those who cannot code can create test cases, and once created, test cases can be reused.
Because Selenium automates actions that humans perform, it can prevent human errors that often occur during manual testing. As well as reducing human error, using Selenium for test automation can lead to shorter testing time, improved test coverage and product quality, and reduced costs.
Selenium also supports a wide range of environments:
|Platform||Windows, macOS, Linux|
Microsoft Edge IE Mode
*Internet Explorer 11 is no longer officially supported
Since it supports a wide range of programming languages, there is no need to relearn a new language from scratch.
Selenium is the de facto standard as a free test automation tool, so there is a wealth of information available online. One engineer who used Selenium commercially commented that some of its benefits include the ability to incorporate I/O processing into the script, and that you can manage the code using git. Now that we’ve covered the benefits of Selenium, let’s move on to its disadvantages.
Disadvantages of Selenium test automation
From what we’ve discussed so far, you may think that Selenium is an extremely useful test automation tool. However, every tool, no matter how great, has its disadvantages and some drawbacks that can make the platform less accessible.
Selenium is not a tool that allows you to automate tests simply by installing Selenium WebDriver. Once Selenium WebDriver is installed, you need to maintain the test case as you record it. This is the first disadvantage of Selenium and the reason why it’s free.
Although Selenium is great for automating interactions with web browsers, it falls short as a tool for testing web applications in general. Some test code can become redundant (dead code), and you have to write a wait process into the test code to perform asynchronous processes (executing the next process without waiting for a response from other tasks when multiple tasks are executed simultaneously). Without attributes and ids on the frontend, test results can easily become flaky, and some engineers who’ve used Selenium have complained that managing locators is quite complicated and time-consuming. If we also had to build test environments and update test cases every time, it would be a huge amount of work.
And although Selenium’s website has a chat room, you can’t contact support in Japanese. In other words, support is lacking, so you would have to solve issues yourself. At first glance, Selenium may seem easy to use, but there are quite a few challenges that need to be addressed before it can be a viable option for businesses.
Autify lets you automate E2E testing in both staging and production environments
Even after software development is complete and has passed a series of tests, errors can still occur when you run E2E tests after deploying to the production environment. This can be avoided by running tests in the staging environment.
Staging is when an E2E test is run in an environment that’s almost identical to the production environment – it’s a final check to ensure the system behaves and looks right. By testing in a staging environment after the usual set of tests and before production testing, we can find any problems missed in the development environment and greatly reduce the risk of issues occurring after production release.
With Autify, you can automate E2E testing in both staging and production environments, as well as execute multiple assertions, and if something goes wrong during testing, AI will automatically roll back to the last revision.
Autify AI automatically monitors staging and production environments immediately after deployment
Autify can automate E2E testing after the system has been deployed to staging and production environments, but you can automate even more. Because Autify is integrated into the CI/CD pipeline, AI automatically starts monitoring immediately after deployment and continuously after release. It runs regression tests to ensure that bugs you thought were fixed haven’t resurfaced, and that there aren’t any compatibility issues caused by software version upgrades, etc. If it finds any issues, it will notify you before proceeding to the next step.
Even if additional manual testing is required before production release, Autify covers most of the areas that need to be tested, significantly reducing the amount of manual testing. With Autify, you can schedule E2E testing so that AI regularly tests the production environment, which allows you to find issues before humans notice them.
Autify also supports email testing and iOS/Android mobile app testing, and because each organization is assigned a fixed IP, it offers excellent security. Various support channels are available as well:
|Support hours||Japan office: 10:00 – 18:00 on weekdays (JST)
U.S. office: 8:00 – 17:00 on weekdays (PST)
*We will respond to requests received outside of business hours from the next business day on a first come, first served basis.
|Time to first response||Japan office: we aim to respond within 2 business days from receiving your message.
U.S. office: we will usually respond in 4-8 business hours.
*The time it takes us to provide a solution or workaround depends on the nature of your inquiry.
|Chat support||Should you have questions and concerns regarding using Autify, you can contact us via chat.
An Autify member will reply to your inquiry.
|Failed tests||To get support for a failed test, please contact us by clicking the “get support” button on the test results page.|
We have a dedicated support channel if your automated test fails – if you send us a screenshot of the test results page, we will be able to diagnose the issue.