https://github.com/arpit2438735/webdriver-selenium-hooks
https://github.com/arpit2438735/webdriver-selenium-hooks
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/arpit2438735/webdriver-selenium-hooks
- Owner: arpit2438735
- License: mit
- Created: 2017-01-24T06:10:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T04:14:42.000Z (over 8 years ago)
- Last Synced: 2025-01-14T08:32:09.990Z (4 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: license
Awesome Lists containing this project
README
# webdriver-selenium-hooks
> Webdriver configuration hooks for starting and stopping selenium standalone server with PhantomJS.[](https://travis-ci.org/wilmoore/node-wd-selenium-hooks) [](https://codeclimate.com/github/wilmoore/node-wd-selenium-hooks) [](https://github.com/feross/standard)
```shell
npm install wd-selenium-hooks --save-dev
```> You can also [download the files manually](https://github.com/wilmoore/node-wd-selenium-hooks/releases).
## Copy of node-wd-selenium-hooks
1. Because I or no one can't fork it.
2. There is no development for a long time.###### npm stats
[](https://www.npmjs.org/package/wd-selenium-hooks) [](https://www.npmjs.org/package/wd-selenium-hooks) [](https://gemnasium.com/wilmoore/node-wd-selenium-hooks)
## Usage
In your `wdio.config.js` add the following:
```js
var selenium = require('wd-selenium-hooks')exports.config = {
onPrepare: function () {
selenium.onPrepare(this)
},onComplete: function () {
selenium.onComplete(this)
}}
```## API
### `.onPrepare(this)`
Starts the selenium server.
###### arguments
- `object (this)` Reference to the configuration.
###### returns
- `(Undefined)`
### `.onComplete(this)`
Stops the selenium server.
###### arguments
- `object (this)` Reference to the configuration.
###### returns
- `(Undefined)`
## Reference
- [WebdriverIO Configuration](http://www.webdriver.io/guide/getstarted/configuration.html)
## Alternatives
- [Alternative approach using promises](https://gist.github.com/klamping/f48f3167775e483e712e)
## Contributing
> SEE: [contributing.md](contributing.md)
## Licenses
[](https://github.com/wilmoore/node-wd-selenium-hooks/blob/master/license)