The Benefits of Using WebDriver, a W3C standard, in Test Automation
The best stuff comes free (as in freedom and free beer)
Many automated testers with my age have tried many test automation (functional) frameworks or tools at work and failed (check out the Definition of End-to-End Test Automation Success), such as
HP Quick Test Pro, IBM Rational Functional Tester, Microsoft Coded UI Test, TestComplete, Tosca, Ranorex
PhantomJS, Protractor, TestCafe, Puppeteer, Cypress and Playwright
My list is much shorter: Watir (2005–2011) and raw Selenium WebDriver (2011 — today), both with RSpec syntax framework, with a 100% success rate and 10X+ productivity (long-time readers have seen some stats and test reports).
Table of Contents:
· I have been testing exactly the same way, using raw Selenium WebDriver with RSpec, since 2011
· The benefits of sticking with WebDriver
∘ 1. Worry-free
∘ 2. Free (as in freedom and free beer)
∘ 3. Better, in almost every aspect
∘ 4. I applied it to Desktop Test Automation
∘ 5. My daughter is applying to Mobile Test Automation
I have been testing websites exactly the same way, using raw Selenium WebDriver with RSpec, since 2011
I started learning Test Automation in 2005 with Watir and switched to Selenium WebDriver (aka. Selenium 2) when it was released in 2011. I have been doing web test automation (and others, which will show shortly) exactly the same way, using raw Selenium WebDriver with RSpec. Yes, I am very productive, generally 10X to 100X more productive than others.
This does not mean I am narrow-minded. Software Engineers tend to be fixated/biased on a preferred language. I am probably more objective than most, as My Selenium Recipes Book series covers all these five languages.
Also, I reviewed and tried some test automation frameworks/tools (listed earlier), but they were ALL no good, far behind raw Selenium WebDriver / Appium.
With my programming skills (an international programming award winner and a proud owner of several highly-acclaimed apps), I did not create a so-called test automation framework, again, just raw Selenium WebDriver.
If I said, “I recommend a commercial test automation framework X”, there are chances that my opinion may be compromised. With my somewhat limited influence (author and over 100+ featured articles in leading testing newsletters), I did receive a few commercial proposals to pay me to say something like that. I declined all.
My advice is “Raw Selenium WebDriver with RSpec”. Surely, there are 100% no commercial factors.
Some might say, “on the framework, yes, but you have a commercial tool TestWise”. First of all, I am talking about the framework here. Tools are optional. I am an author, and I often say, “software engineers need to read regularly?” Is this sentence wrong? Of course, not. Reading regularly is always good, regardless of me being an author, the beneficiaries are people who follow the advice. You have a choice for tools, that’s freedom. Recently, I introduced a TestWise competitor product, JetBrains Aqua. After all, I offer fully-featured TestWise with a free mode. If one is OK with Zoom’s 40-min limit, he/she shall not have any complaints to TestWise and BuildWise Agent.
The Benefits of sticking with WebDriver
1. Worry-free
Browsers like Chrome update regularly (about every two months), and Web technologies will evolve (such as shadow DOM). When that happens, the browser vendors will ensure Selenium WebDriver still works, not caring about Cypress or Playwright, or any others.
As long as my tests are raw Selenium, it is future-proof (as best as it can be). Not forever, of course, I have been writing test scripts the same way for 12 years, that’s quite a long time for things largely unchanged in software. Check out my article, Upgrade 500 Selenium v3 tests to Selenium v4, Easy!
I don’t like worrying, do you?
2. Free (as in freedom and free beer)
I met Richard Stallman in person, the father of the Free Software Foundation (FSF), in my early career. I heard “Free has two meanings in English, as in freedom and free beer” from him first.
“Free software” means software that respects users’ freedom and community … Thus, “free software” is a matter of liberty, not price.” — GNU
In test automation, test automation tools have long been associated with being proprietary and expensive. The prices of test automation tools are less than before (typically ~US$10,000 20 years ago), but it is quite high. Some test automation tools still charge users for runtime licenses!
When I write test scripts in raw Selenium WebDriver, I have the freedom to put them on Github and send them to my friends or clients. People either run from the command line, download and use TestWise or set up Visual Studio Code for running RSpec tests. They have freedom, no need to pay a cent.
3. Better, in almost every aspect
Some cynical people please would argue, “No, the best stuff is definitely not free or cheap”. How about Air (free), Water and Food (cheap, compared to iPhone, for example)? In software, can you imagine cloud-computing without Linux and Git (both completely free)? Especially, Git makes commercial version control systems, such as ClearCase, StarTeam and Microsoft TFS history.
In 2012, one architect from Microsoft Gold Partner consulting company debated me, saying how good Microsoft TFS shouldn’t use the open-source option, Git, recommended by me. In 2018, Microsoft acquired GitHub for 7.5 Billion.
(By the way, Github is developed in the wonderful Ruby language).
Keep reading with a 7-day free trial
Subscribe to AgileWay’s Test Automation & Continuous Testing Blog to keep reading this post and get 7 days of free access to the full post archives.