Skip to content

Commit

Permalink
Attempt to support chromedriver
Browse files Browse the repository at this point in the history
  • Loading branch information
Daanoz committed Jan 6, 2015
1 parent 933f68d commit f72137d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
We wrote this after extensive problems getting selenium webdriver tests to run in all local and 3rd party environments. If you are using circleci and want to run headless tests then the selenium_phantom_hub task will do the trick.

Note that we have found probems with selenium and bundled chromedriver but at the current time we do not have an option to start chromedriver in the same way as phantomjs. Our advice is use firefox and phantom for CI testing and saucelabs / local for the rest.

## Getting Started
This plugin requires Grunt `~0.4.2`

Expand Down Expand Up @@ -53,6 +51,7 @@ You can see we do this in our tests, have a look at our GruntFile setup for the
- timeout
- maxSession
- phantomPort
- chromeDriver

### Usage Examples

Expand Down
4 changes: 4 additions & 0 deletions tasks/selenium_webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ function start( next, isHeadless, options ) {
selOptions.push( '-maxSession' );
selOptions.push( options.maxSession );
}
if ( options.chromeDriver) {
selOptions.push( '-Dwebdriver.chrome.driver=' + options.chromeDriver);
}

var spawnOptions = options['cwd'] ? {cwd: options['cwd']} : null;
seleniumServerProcess = spawn( 'java', selOptions, spawnOptions );
Expand Down Expand Up @@ -259,6 +262,7 @@ module.exports= function ( grunt) {
host: '127.0.0.1',
port: 4444,
maxSession: false,
chromeDriver : false,
cwd: null
});
var done = this.async();
Expand Down

0 comments on commit f72137d

Please sign in to comment.