https://github.com/tomwayson/grunt-se-launch
A grunt task to launch a standalone selenium server
https://github.com/tomwayson/grunt-se-launch
Last synced: 4 months ago
JSON representation
A grunt task to launch a standalone selenium server
- Host: GitHub
- URL: https://github.com/tomwayson/grunt-se-launch
- Owner: tomwayson
- License: mit
- Created: 2014-09-16T13:46:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-13T19:09:49.000Z (almost 12 years ago)
- Last Synced: 2025-04-05T18:52:43.705Z (about 1 year ago)
- Homepage: https://www.npmjs.org/package/grunt-se-launch
- Size: 204 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-se-launch
A Grunt task to launch a selenium server.
## Usage
Set up configuration options:
```javascript
grunt.initConfig({
'selenium-launch': {
options: {
port: 4445,
jarDir: 'C:/Selenium/',
jar: 'selenium-server-standalone-2.41.0.jar',
chromeDriverExecutable: 'chromedriver.exe'
}
}
})
```
Load the task:
```javascript
grunt.loadNpmTasks('grunt-se-launch');
```
Call the task:
```javascript
grunt.registerTask('test', [ 'selenium-launch', 'intern'])
```
## API
### Grunt Task
**selenium-launch**
Attempt to launch a selenium instance, binding to `process.env.SELENIUM_LAUNCHER_PORT`. The task completes when the server is running and bound. The server is automatically killed when the grunt process exits - no need to take extreme steps to ensure the process isn't left a zombie.
### Environment Variables
**process.env.SELENIUM_LAUNCHER_PORT**
If set when running grunt, defines the preferred port to run Selenium on. After the task has run, has the value of the port selenium bound on.
**process.env.SELENIUM_HUB**
After the task has run, has the string URI for webdriver hub connection. Use this string when connecting clients to selenium.