Giter Club home page Giter Club logo

wdm-webdriverio's Introduction

<<<<<<< HEAD

To run this test

npm install
npm test

Webdriver-manager as a dependency

In wdio.config.js, the following was added to download the binaries, start the selenium server standalone, and stop the server:

const wdm = require('webdriver-manager-replacement');

// Set the log level for webdriver-manager. If this is not set, nothing will log.
wdm.setLogLevel('info');

// To run this in the test, run as detach must be set to true. If this is not
// set to true, the selenium server standalone process will not return, preventing
// tests from being executed.
const runAsDetach = true;
const options = wdm.initOptions(
  [wdm.Provider.ChromeDriver, wdm.Provider.Selenium],
  runAsDetach);
    
exports.config = {

  // <<< Other configurations for wdio >>>

  onPrepare: function () {
    // update binaries and start the server.
    return wdm.update(options).then(() => {
      return wdm.start(options).then(() => {
        // wait for the server to start in detached mode.
      });
    });
  },
  onComplete: function () {
    // shutdown the standalone server.
    return wdm.shutdown(options).then(() => {
      // wait to shutdown the server.
    });
  }
}

=======
# webdriver-manager + webdriverio

Use webdriver-manager-replacement as a dependency library and not as a CLI.

const wdm = require('webdriver-manager-replacement'); const log = require('loglevel'); let selenium = null;

exports.config = { ...

onPrepare: function () { // if value is not set, nothing from wdm gets logged. log.setLevel('info');

// Should create an initOptions method instead of this...
chrome = new wdm.ChromeDriver({});
selenium = new wdm.SeleniumServer({});
const options = {
  providers: [{
    binary: chrome
  }],
  server: {
    binary: selenium,
    runAsNode: true,
    runAsDetach: true
  }
};
return wdm.update(options).then(() => {
  return wdm.start(options);
});

}, onComplete: function () { selenium.stopServer(); } };

deps(webdriver-manager): update for new version of webdriver-manager-replacement

wdm-webdriverio's People

Contributors

cnishina avatar

Stargazers

Boris Osipov avatar Christian Bromann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.