Saturday, December 15Be an Automation Engineer

WebdriverIO

Element Locators in WebdriverIO

Locators, WebdriverIO

Selenium supports 8 different element locating stategies like @id, @className, @xpath, @css etc.. In selenium we need to specify which locator we are passing like if we are passing xpath then we need to specify it with By.xpath(‘locator’).

WebdriverIO has simplified element location strategies. We don’t need to specify whether we are passing xpath/css. Simply we can write browser.click(‘locator’). WebdriverIO » Continue Reading.

Protractor vs WebdriverIO vs NightWatch

JavaScript, JS, NightwatchJS, Node.js, Protractor, WebdriverIO

JavaScript is now a popular choice of language for developing web applications. To test the applications developed in JavaScript, there seem too many end to end testing frameworks and tools which help in Unit testing, UI testing. However, to use one of them, one has to go through and analyse each tool and framework to know which suits their application » Continue Reading.

A basic example program using webdriverio with wdio test runner

WebdriverIO

Note: This example program is with wdio test runner configured.

1. How to Install?

WebdriverIO is a ‘npm’ package and runs on ‘Node.js‘. So, we need to install ‘Node.js’ and ‘npm’ in our machine before installing WebdriverIO.

Step by step process of installing ‘Node.js’ and ‘npm’ in our Windows / Mac machines.

2. Configure project using wdio » Continue Reading.

Configuring wdio test runner

WebdriverIO

Run the below command in your project location to make the ‘webdriverio’ library available in your project.

npm install webdriverio

Run the below command to configure wdio test runner.

./node_modules/webdriverio/bin/wdio config

A questioner will be displayed as below image. Answer the simple question to configure your project to run webdriverio tests. Questions and sample answers: Q: Where do you want » Continue Reading.

A basic example using WebdriverIO: Without test wdio test runner

WebdriverIO

Note: This example program is without any testing framework.

1. How to install?

WebdriverIO is a ‘npm’ package and runs on ‘Node.js‘. So, we need to install ‘Node.js’ and ‘npm’ in our machine before installing WebdriverIO.

Step by step process of installing ‘Node.js’ and ‘npm’ in our Windows / Mac machines.

After installing Node.js, run the below » Continue Reading.