You are on page 1of 5

JavaScript UI Automation

SELENIUM WITH
WEBDRIVERIO

Arman Khandelwal
Tata Consultancy Services Ltd
TABLE OF CONTENTS
INTRODUCTION TO WEBDRIVERIO............................................................................................................................... 1

1. WHAT IS WEBDRIVERIO...........................................................................................................................................................2
2. WEBDRIVERIO ARCHITECTURE.............................................................................................................................................2
3. GETTING STARTED WITH NODE.JS AND NPM INSTALLATION...................................................................................................2
3.1. Step by Step Instructions to run first test with WebDriverIO...........................................................................................3

JAVASCRIPT FUNDAMENTALS........................................................................................................................................ 3

1. JAVASCRIPT HELLO WORLD PROGRAM.................................................................................................................................4

1
INTRODUCTION TO WEBDRIVERIO
1. WHAT IS WEBDRIVERIO

WebDriverIO is an open source testing automation framework written in JavaScript and running on Node.js. Its
support for both BDD and TDD.

WebDriverIO allows us to automate any application written with modern web frameworks such as React, Angular etc
as well as native mobile applications for Android and IOS.

WebDriverIO is built on Node.js engine and use JavaScript to code the Automation and WebDriverIO uses Selenium
under hood. All the features of Selenium are available in WebDriverIO with additional advantage of exclusive
assertions for Test validations.

2. WEBDRIVERIO ARCHITECTURE

WebDriverIO is built over NodeJS, which is an implementation of the JSON Wire Protocol. Packaged into npm, it
conducts communication using NodeJS, which is open-source and widely used for application development. It uses
RESTful architecture to conduct automation testing.

The user writes the test script in JavaScript using the WebDriverIO library, where the Service request is sent via
NodeJS as an HTTP command. It uses JSON Wire protocol, and the services module forwards the request to the
browser.

Upon receiving the command, the browser performs the user actions, which tests the validity of the application
functions.

3. GETTING STARTED WITH NODE.JS AND NPM INSTALLATION

2
3.1. STEP BY STEP INSTRUCTIONS TO RUN FIRST TEST WITH WEBDRIVERIO

 Install Node.js
 Set Node Home Path in System Variables
 Create NPM Project
 Download and Import Project into Visual Code
 Understand the importance of Packages.json in Node Projects
 Install WebDriverIO CLI dependencies
 Generate Configuration file to store WebDriverIO settings
 Create Mocha Spec/Test File to write first Automation Program

JAVASCRIPT FUNDAMENTALS
3
1. JAVASCRIPT HELLO WORLD PROGRAM

You might also like