Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call before/after hook in additional arguments #43

Open
ando771 opened this issue Jun 6, 2016 · 2 comments
Open

Cannot call before/after hook in additional arguments #43

ando771 opened this issue Jun 6, 2016 · 2 comments

Comments

@ando771
Copy link

ando771 commented Jun 6, 2016

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 webdriver@4.0.9 and gulp-webdriver@2.0.1

@christian-bromann
Copy link
Contributor

@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.

@megagon
Copy link

megagon commented Oct 19, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants