Introduction to WebDriverIO Tutorial

Introduction to WebDriverIO Tutorial

<<Complete WebDriverIO Tutorial>>                                         Next Post>>

Introduction to WebDriverIO Tutorial

Following are the content by which you can be familiar with WebDriverIO:-

Note: All the terms and tools mentioned in this article will be explained in detailed in the upcoming sessions. Keep reading even though you don’t understand any terms and only understand this topic at a high level.

1) What is WebDriverIO ?

WebdriverIO is an open source testing utility for nodejs.

It makes it possible to write super easy selenium tests with Javascript in your favorite BDD or TDD test framework.

It basically sends requests to a Selenium server via the WebDriver Protocol and handles its response.

These requests are wrapped in useful commands and can be used to test several aspects of your site in an automated way.

In Simple Terms :-

WebdriverIO is a custom implementation for selenium’s W3C webdriver API. It is written in Javascript and packaged into ‘npm’ and runs on Node.js.

2) Why you should consider using WebdriverIO over Selenium WebDriver?

Following are the reasons why you should consider using WebDriverIO over Selenium WebDriver :-

i) It’s Front-end Friendly

Unlike most browser automation frameworks out there, WebDriverIO is written entirely in JavaScript. Even the Selenium installation is done through an NPM module (Will be explained in upcoming sessions).

ii) It has the Power of Selenium

WebdriverIO uses Selenium beneath it, that simplifies to run my tests in all sorts of browsers.
Selenium, is an incredibly robust platform and an industry leader for running browser automation,and WebdriverIO stands on top of Selenium. As all the great things about Selenium are available, without the overhead of writing Java based tests.

iii) Simple to use

Commands you use in your WebDriverIO tests are crisp, concise and all about common sense.

WebDriverIO doesn’t make you  write code to connect two parts together (Explained Below) which are obviously meant for each other.

For example, if I want to click a button via a normal Selenium script, I have to use two commands. One to get the element and another to click it.


It’s obvious that if I want to click something, I’m going to need to identify it.

WebdriverIO simplifies the ‘click’ command by accepting the element selector right in to the command, then converts that in to the two Selenium actions needed.

That means instead of writing the below:


I can just write the below:

iv) Page Objects

With the recent 4.x release of WebdriverIO, they introduced a new pattern for writing Page Objects.

For those unfamiliar with the term, Page Objects are a way of representing interactions with a page or component.

Rather than repeating the same selector across your entire test suite for a common page element, you can write a Page Object to reference that component.

Then in your tests, you just ask the Page Object for what you need and it handles it for you.

They’re easier to read because tests become less about the specific implementation of a page and more about what the page does.

For example, say we need to log in to our website for most of our tests. Without page objects, all our tests would begin with:

browser.url("login-page").setValue("#username", "test_`user").setValue("#password", "12345").click("#login-btn")

With page objects, that can become as simple as:

LoginPage.login('test_user', '12345');

3) What are the prerequisites required for learning WebDriverIO ?

You should have a good understanding of Selenium (Not Compulsory) and JavaScript (will be explained in the upcoming sessions) and we’ll be doing a little bit of work on the command line. As a prerequisite for the WebdriverIO test development, it’s necessary to have the following tools installed on your machine:

  1. Node.js
  2. npm
  3. Web-browser (In our case, Firefox)

Installations for all the mentioned pre-requisites will be explained in the upcoming sessions

4) What types of applications that WebDriverIO can and cannot Automate ?

WebDriverIO can automate both web applications and native mobile applications.

5) What all different browsers are supported by WebDriverIO ?

WebDriverIO supports all the below mentioned famous browsers in the market:-
i) Edge
ii) Chrome
iii) Firefox
iv) Safari
v) PhantomJs

6) What are the different Programming languages that are supported by WebDriverIO ?

Javascript is the programming language that is supported by WebDriverIO Test Automation tool.

7) What are the different version of WebDriverIO ?

Different versions of WebDriverIO API are :-
i) v3.4
ii) v4.7
iii) v4.8
iv) v4.9
v) v4.0
vi) v5.0 Latest one has Released on 19 December 2018.

8) What are the different testing frameworks supported by WebDriverIO ?

Some of the popular testing frameworks supported by WebDriverIO :-
i) Jasmine
ii) Mocha
iii) Cucumber

Next Steps:

> To learn more about WebDriverIO, continue to the next post (Click on Next Post link below)

> Check complete WebDriverIO Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning ?

About Me > Ajay Lunia 

Connect to me on LinkedIn (Click here)

On a mission to help the Software Testing Community in all possible ways.

<<Complete WebDriverIO Tutorial>>                                         Next Post>>

Comments (3)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

Open chat
Contact Us on Whatsapp