1.0.1 • Published 2 years ago

hermione-selenium-standalone-runner-pack v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Hermione selenium standalone runner

This package has been created to automatic run selenium-standalone package of Hermione testing.

And include simple module:

module.exports = (hermione) => {
let selenuim;

    hermione.on(hermione.events.RUNNER_START, async () => {
        const file = fs.openSync('selenuim-log', 'w');

        selenuim = spawn('selenium-standalone', ['start'], {
            stdio: ['ignore', file, file],
            shell: true
        });

        await delay(2000);
    });

    hermione.on(hermione.events.RUNNER_END, () => {
        return new Promise((resolve) => {
            selenuim.on('exit', () => resolve());

            selenuim.kill();
        })
    })
};