gulp-webdriver icon indicating copy to clipboard operation
gulp-webdriver copied to clipboard

Cannot call before/after hook in additional arguments

Open ando771 opened this issue 8 years ago • 2 comments

I run something like this:

gulp.task('test', function (cb) {
    return gulp.src('wdio.conf.js').pipe(webdriver({
        onComplete: function () {
            console.log('`onComplete` call')
        },
        before: function () {
            console.log('`before` hook');
        },
        after: function (){
            console.log('`after` hook')
        }
    }));
})

but "before" and "after" hooks not calling. If it was defined in wdio.conf.js, then hooks call successfully.

I am using [email protected] and [email protected]

ando771 avatar Jun 06 '16 10:06 ando771

@ando771 I am afraid this is not working and will be hard to implement. Since we spawn child processes that don't have access to these methods (because it is from gulp) there is no easy way to read them without writing them into maybe a temporary config file. I will leave this open in case someone wants to work on this but I would recommend to keep hooks within the test file.

christian-bromann avatar Jun 06 '16 20:06 christian-bromann

We also need this and i will try to implement it. I will let you know

megagon avatar Oct 19 '16 13:10 megagon