https://github.com/mailru/wdio-redirect-by-pattern-service
https://github.com/mailru/wdio-redirect-by-pattern-service
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mailru/wdio-redirect-by-pattern-service
- Owner: mailru
- License: other
- Created: 2017-03-02T16:35:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T11:22:29.000Z (over 8 years ago)
- Last Synced: 2025-01-14T03:55:56.479Z (9 months ago)
- Language: TypeScript
- Size: 104 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```sh
$ npm install wdio-redirect-to-pattern-service --save
```Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
## 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.```js
// wdio.conf.jsexports.config = {
// ...
services: [
'redirect-to-pattern',
],
redirectToPattern: {
rules: [
{
match: ".*google.*",
replace: "https://mail.ru"
}
]
},
// ...
};
```## How it works?
This service uses [Redirect-to-pattern](https://github.com/ivan-chashkin/redirect-by-pattern) plugin for Google Chrome.
You can [install](https://chrome.google.com/webstore/detail/redirect-by-pattern/cbmflacocpalbpdafcegabhmgiklnfkn) it for yourself and play with settings before write config for service.