0.0.2 • Published 7 years ago
wdio-redirect-to-pattern-service v0.0.2
wdio-redirect-to-pattern-service
WebdriverIO service for making redirects by pattern
Installation
You can install wdio-redirect-to-pattern-service via NPM as usual:
$ npm install wdio-redirect-to-pattern-service --save
Instructions on how to install WebdriverIO
can be found here.
Configuration
Setup wdio-redirect-to-pattern-service by adding redirect-to-pattern
to the service section of your WebdriverIO config and define your desired redirect rules in redirectToPattern
section.
// wdio.conf.js
exports.config = {
// ...
services: [
'redirect-to-pattern',
],
redirectToPattern: {
rules: [
{
match: ".*google.*",
replace: "https://mail.ru"
}
]
},
// ...
};
How it works?
This service uses Redirect-to-pattern plugin for Google Chrome. You can install it for yourself and play with settings before write config for service.