Hello everyone!
I was inspired to write this article by my students and QA Automation Engineers that I met on conferences and other QA activities.
Usually, when my WebdriverIO course starts, my students asks me why are we studying WebdriverIO and not Selenium?
A lot of skilled QA Automation Engineers that work with other programming languages than JavaScript (Java or Python, for example - these are the popular ones) - they don't really know much about WebdriverIO and what it has to offer.
Anyway, let me tell you about difference between WebdriverIO and Selenium, so the answer if one is better than another would be clear for you.
The picture above displays ratio of web UI automation tools mentions in 2020 for QA Automation job openings.
You can see for sure that Selenium is unconditional leader in this list, and there're a few reasons for it:
Makes sense, right?
This one is a ratio of programming languages mentions in 2020 for QA Automation job openings.
Selenium is being used on most of the languages except JavaScript (TypeScript), and, as you can see, JavaScript holds only 6.9% of test automation market.
Currently, JavaScript test automation market is starving for test automation specialists, because it has so many unique tools, such as Cypress, WebdriverIO, TestCafe, Playwright (also released for Java and Python) and others. In nearest future, JavaScript part will rise in this ratio because of this tools saturation (and also because most of the front-end development is being done on JavaScript, while the trend is that companies involve developers into test automation).
In conclusion, Selenium is the most popular web UI automation tool in test automation market.
If you'll take a look at job openings where JavaScript is being used for test automation, you won't find much mentions of Selenium - there'll be Cypress, WebdriverIO or Playwright instead.
That's so because there is no advantage for Selenium over these tools. Selenium uses webdriver to interact with browser, while there's much faster DevTools protocol (but it doesn't support many browsers at current moment). Anyway, the truth is - not many companies perform cross-browser testing, they just run their tests on Chrome and that's it.
WebdriverIO has selection of the way you'd like to interact with browser - whether it's webdriver or DevTools.
Also, Selenium is just a web UI tool and that's it. You only use it to manipulate actions in a browser. While WebdriverIO, on the other hand, is a framework, which has command-line interface (CLI) and very flexible configuration.
In other words, WebdriverIO can do the same things that Selenium, but also comes with lots of integrations with popular test automation tools out of a box.
In conclusion, why WebdriverIO is better than Selenium:
Seems like WebdriverIO is a winner here, but actually, it's so-so...
You see, WebdriverIO is available for JavaScript (TypeScript) only, while most of the test automation projects are being developed using Java, Python and etc.
So it's safe to say that WebdriverIO is better than Selenium if you develop automated tests using JavaScript (TypeScript).
Thanks for reading, I hope you've learned something new and now know more about test automation frameworks (especially JavaScript ones).