Main Features of WebdriverIO:
- WebdriverIO is a good automation tool which can automate both web applications and native mobile Apps.
- It has simple and easy to write Syntax.
- It has integrated test runner which helps us to write asynchronous commands in a synchronous way so that we don’t need to care about how to handle a Promise to avoid racing conditions.
- It has 'wdio setup wizard' which makes our project setup very easy.
- The test runner also comes with a variety of hooks that allow us to interfere into the test process in order to e.g. take screenshots if an error occurs or modify the test procedure according to a previous test result.
- WebdriverIO services will be helpful to integrate our test to third party tools like 'Appium'.
- 1 Element Locators in WebdriverIO
- 2 Protractor vs WebdriverIO vs NightWatch
- 3 A basic example program using webdriverio with wdio test runner
- 4 Configuring wdio test runner
- 5 A basic example using WebdriverIO: Without test wdio test runner
- 5.1 All posts
- 5.2 Element Locators in WebdriverIO
- 5.3 Protractor vs WebdriverIO vs NightWatch
- 5.4 A basic example program using webdriverio with wdio test runner
- 5.5 Configuring wdio test runner
- 5.6 A basic example using WebdriverIO: Without test wdio test runner
- 5.7 Installing WebdriverIO
- 5.8 Share it:
- 5.9 Like this:
Basic Example programs:
Before installing webdriverio, make sure java is installed in your machine and PATH, JAVA_HOME environment variables are set.
1. Install webdriverio and run first program with wdio test Runner. -- With WDIO test runner.
2. Install webdriverio and run first program without wdio test Runner. -- Without WDIO test runner.
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.
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.» Continue Reading.
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.
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.
After installing Node.js, run the below » Continue Reading.