Skip to content

Commit

Permalink
removed default overide of setting of timeout and maxSession options
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Cook committed Aug 29, 2014
1 parent 9a1966b commit 884fbb1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tasks/selenium_webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,15 @@ function start( next, isHeadless, options ) {
selOptions.push ( '-port' );
selOptions.push ( options.port );

selOptions.push ( '-timeout' );
selOptions.push ( options.timeout );
if ( options.timeout) {
selOptions.push( '-timeout' );
selOptions.push( options.timeout );
}

selOptions.push ( '-maxSession' );
selOptions.push ( options.maxSession );
if ( options.maxSession) {
selOptions.push( '-maxSession' );
selOptions.push( options.maxSession );
}


seleniumServerProcess = spawn( 'java', selOptions );
Expand Down Expand Up @@ -236,20 +240,20 @@ process.on('exit', function onProcessExit() {
module.exports= function ( grunt) {
grunt.registerTask( 'selenium_start' , 'Starts and stops webdriver in grid or hub mode for use with 3rd party CI platforms' , function () {
var options = this.options({
timeout: 30,
timeout: false, // set to integer if required
host: '127.0.0.1',
port: 4444,
maxSession: 5
maxSession: false
});
var done = this.async();
return start ( done , false, options );
});
grunt.registerTask( 'selenium_phantom_hub' , 'Starts selenium in hub mode and attaches a single phantonjs to it for headless env', function() {
var options = this.options({
timeout: 30,
timeout: false, // set to integer if required
host: '127.0.0.1',
port: 4444,
maxSession: 5,
maxSession: false,
phantomPort: 8080
});
var done = this.async();
Expand Down

0 comments on commit 884fbb1

Please sign in to comment.